Friday 4 May 2012

Struts interview questions 4


16.Can we have more than one struts-config.xml file for a single Struts application?
Yes, we can have more than one struts-config.xml for a single Struts application. They can be configured as follows:

<servlet>
<servlet-name
>action</servlet-name>      
 
<servlet-class>
        org.apache.struts.action.ActionServlet
 
</servlet-class>
<init-param>
 
<param-name>config</param-name>
 
 <param-value>
  
  /WEB-INF/struts-config.xml,             
     /WEB-INF/struts-admin.xml,
     /WEB-INF/struts-config-forms.xml   
      
 
 </param-value>
</init-param>
.....
<servlet>


17.What is the directory structure of Struts application?
The directory structure of Struts application :

18.What is the difference between session scope and request scope when saving formbean ?
when the scope is request,the values of formbean would be available for the current request.
when the scope is session,the values of formbean would be available throughout the session.
19.What are the important tags of struts-config.xml ?
The five important sections are:

20.What are the different kinds of actions in Struts?
The different kinds of actions in Struts are:
  • ForwardAction
  • IncludeAction
  • DispatchAction
  • LookupDispatchAction
  • SwitchAction

No comments:

Post a Comment