ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   SiteMap shows list of All Categories in this site.
Google
 
Categories  >>  Software  >>  Java J2EE  >>  Java Related  >>  Struts
 
 


 

 
 Core Java interview questions  Core Java Interview Questions
 Advanced Java interview questions  Advanced Java Interview Questions
 Swing interview questions  Swing Interview Questions
 EJB interview questions  EJB Interview Questions
 Servlets interview questions  Servlets Interview Questions
 Struts interview questions  Struts Interview Questions
 JDBC interview questions  JDBC Interview Questions
 JMS interview questions  JMS Interview Questions
 SunOne interview questions  SunOne Interview Questions
 J2EE interview questions  J2EE Interview Questions
 Weblogic interview questions  Weblogic Interview Questions
 Websphere interview questions  Websphere Interview Questions
 Java Networking interview questions  Java Networking Interview Questions
 Java J2EE AllOther interview questions  Java J2EE AllOther Interview Questions
Question
In ActionClass we can use only one action i.e execute(), but
in DispatchAction we can use multiple actions.My question is
 , we can use multiple actions in  Action class 
if(action.equals("add") if(action.equals("update"). Then
when to use Action and DispatchAction   which is  frequently
in webapplications.
 Question Submitted By :: Prakash
I also faced this Question!!     Rank Answer Posted By  
 
  Re: In ActionClass we can use only one action i.e execute(), but in DispatchAction we can use multiple actions.My question is , we can use multiple actions in Action class if(action.equals("add") if(action.equals("update"). Then when to use Action and DispatchAction which is frequently in webapplications.
Answer
# 1
If multiple actions refer to the same formbean then we
should go for DispatchAction. Yes as you said it is possible
to write in Action. But by using dispatchAction we can
simply specify the parameter name in config file.

   No need to write the code in our appln
 
Is This Answer Correct ?    1 Yes 0 No
Sekhar Babu
 
  Re: In ActionClass we can use only one action i.e execute(), but in DispatchAction we can use multiple actions.My question is , we can use multiple actions in Action class if(action.equals("add") if(action.equals("update"). Then when to use Action and DispatchAction which is frequently in webapplications.
Answer
# 2
DispatchAction is generally used when we need to group a set
of actions. E.g. addDepartment, editDepartment,
updateDepartment, deleteDepartment. The method to be called
is identified on the basis of a parameter which can be
configured in struts-config.com (action tag). The parameter
is usually passed from the JSP and is automatically mapped
to the action parameter (defined in action tag in
struts-config.xml). Also we need to add an attribute with
name same as the parameter name to the corresponding ActionForm
 
Is This Answer Correct ?    1 Yes 1 No
Shirish
 
 
 

 
 
 
Other Struts Interview Questions
 
  Question Asked @ Answers
 
If we close the browser,when the specific user session is active.Again if we open browse how to retrive it same user??what code i have to da??? TCS3
its a ActionForm controller or model? Wipro13
what is the advantages and diadvantages of Struts?  1
what is the difference between page and pageContext implicit variables Yash-Technologies2
how to create a search field in struts.with code Infosys3
life cycle of struts?  7
What is Request Dispatcher and what is Request Process?  2
explain the struts-configuration file? TCS2
what are tiles in struts? Wipro2
Can i use constructor in Action Class?If yes how?  7
what is frame work in struts? Infosys3
what are the disadvantages of MVC architecture INDUS3
How do you know what to give for the "path " under in struts-config.xml ?  1
What is meant by portals???  6
How many types of action clases are there in stuts and their uses? TCS7
Where can i get jar file for use the struts-tags in struts2?  1
what is tiles in struts?  6
how handle when client send multiple request at atime for single servlet IBM3
What is Request Dispatcher and What is reuest Processor??  2
tell me struts flow ? Fidelity4
 
For more Struts Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com