Sunday, March 27, 2011

Training Course Details

1) Servlets,Servlet Filters,Listners.
2) Jsp, Jsp Beans,Custom tags.
3) Jdbc. Jndi
4) Declarative and Programmatic Authenctation & Authorization.
5) MVC Architecture
6) Struts Framework.
7) Declarative Exception Handling.
8) Modules Framework.
9) Tiles Framework.
10) Validator Framework.
11) Design Patterns.
12) Ant, Junit, Log4j,Eclipse.
13) Hibernate.
14) Spring.
15) Google App Engine
16)JavaScript
17)Ajax.


Click for Private Tuition by a Professional 

Important Servlet Interview Questions

1) Servlet Life Cycle?
2) How can you extract configuration information from web.xml inside your servlet?
3) How can you use ServletContext object to share information among servlets?
4) Difference between using response.sendRedirect() and requestDispatcher object for forwarding from one servlet to another? Which one should be used and when?
5) What are the different ways to do session management in servlets?
6) How do u implement urlrewriting,hiddenfields,cookies and HttpSession objects?
7) How to send session identifier to client machine if cookie is disabled? Hints response.encodeURL() method.
8) What are the use of servlet filters.
9) Interfaces implemented to create a filter?
10) What is the difference between doFilter() method of Filter interface and doFilter() method of FilterChain interface?
11) How to use Servlet Listener to create a website counter, and how to use it to show how many users are online?


Click for Private Tuition by a Professional 

Important Jsp Interview Questions

1) Advantage of Jsp over Servlets.
2) Jsp Life Cycle?
3) Packages & Interfaces used When pagecompiler Servlet converts Jsp into Servlet?
4) What are Implicit Objects in Jsp?
5) What are the elements present in a jsp code apart from template data?
6) What are three types of directives used in jsp?
7) Difference between Scriptlet, Declarations and Expressions?
8) What are the different Action elements?
9) What is the difference between static include and dynamic include?
10)What are the different comments used in jsp?
11)What are the different scopes in which you can place bean objects?
12)When should we use Java Beans and when should we use custom tags?


Click for Private Tuition by a Professional 

Sunday, March 20, 2011

What is Call by Value & Call by Reference in Java-Swap Example-Java Interview Queston

Call By Value

Definition: It is a type of function call wherein the argument passed is of a primitive data type and the value of the argument gets copied to the parameter of the function and in the function definition even if we are swapping the values of the parameter we are actually swapping the copies of the argument not the actual argument.

Example


Call By Reference 

Definition: The argument passed in this type of function is an object type and not a primitive data type. Using call by reference the modifications can be done on the actual arguments because the references of the arguments are passed during the function call. 

Example

For details regarding Online Java J2ee Training please visit www.javatutoronline.com

Jsp FreeMarker Velocity What should be used?


Although you can do mainly most of the view part through jsp there are enough reasons to use Velocity and/or FreeMarker.

Both Velocity and FreeMarker templates can be packaged in a JAR. Struts plugins are distributed through JAR. One cannot distribute JSP's in JAR that easily. This can be one of the reasons why Velocity or FreeMarker may be used. FreeMarker is more advanced then Velocity. So FreeMarker gets the upper hand. Even WebWork developers have switched from Velocity to FreeMarker.




Saturday, March 19, 2011

Struts2 FilterDispatcher and its Working



A FilterDispatcher is used as the Controller in Struts2. Its name in packaged Structure is org.apache.struts2.dispatcher.FilterDispatcher. Prior to using it in the application, it has to be registered in the web.xml as below.



     
The task processing going to be done in the FilterDispatcher is splitted into several subcomponents called interceptors. One of the first interceptor will be used to populate the action object.

The action method in a struts application is executed only after the properties of struts action is populated.

A String value is returned by the method of a struts action. And depending upon the returned value, the page to which control is forwarded is decided.

The view to which the action forwards need not necessarily a jsp

At first the FilterDispatcher verifies the request URI and determines the right action for it.
The mappings of  URI’s and the action classes are present in the struts.xml file found in the WEB-INF/classes directory.

FilterDispatcher does the following for eact action invocation.

1)Determines which action to invoke for a requested URI by consulting the Configuration manager
2) Interceptors registered for the action are invoked one after the other.
3)Then the action method is executed.
4)Then the FilterDispatcher executes the Result.




For details regarding Java J2ee Online Training please visit www.javatutoronline.com