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   To Refer this Site to Your Friends   Click Here
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
Hai all.Can i develope Struts action class without execute(-,-
,-,-)method.Ifd it's possible plz provide some sample code.
 Question Submitted By :: Srinivas123vasu
I also faced this Question!!     Rank Answer Posted By  
 
  Re: Hai all.Can i develope Struts action class without execute(-,- ,-,-)method.Ifd it's possible plz provide some sample code.
Answer
# 1
Yes , we have just use the Dispatch Action class for ignore the execute method.
 
Is This Answer Correct ?    4 Yes 0 No
Shashi
 
  Re: Hai all.Can i develope Struts action class without execute(-,- ,-,-)method.Ifd it's possible plz provide some sample code.
Answer
# 2
If your Action class extends from  Dyna Action Action, then 
you can develop struts action class with out execute 
method. Because in that action class we write our own 
methods insted of execute method.

EXAMPLE:
public class Dispatch_Action extends DispatchAction
{  

public ActionForward add(
    ActionMapping mapping,
    ActionForm form,
    HttpServletRequest request,
    HttpServletResponse response) throws Exception{
    System.out.println("You are in add function.");
      return mapping.findForward("add");
  }

 public ActionForward delete(
    ActionMapping mapping,
    ActionForm form,
    HttpServletRequest request,
    HttpServletResponse response) throws Exception
 {
    System.out.println("You are in delete function.");
            return mapping.findForward("delete");
  }
 public ActionForward search(
    ActionMapping mapping,
    ActionForm form,
    HttpServletRequest request,
    HttpServletResponse response) throws Exception{
    System.out.println("You are in search function");
    return mapping.findForward("search");
   }
  public ActionForward save(
    ActionMapping mapping,
    ActionForm form,
    HttpServletRequest request,
    HttpServletResponse response) throws Exception{
    System.out.println("You are in save function");
    return mapping.findForward("save");
  
 }
}
 
Is This Answer Correct ?    2 Yes 0 No
Sreekanth Madamanchi
 
 
 
  Re: Hai all.Can i develope Struts action class without execute(-,- ,-,-)method.Ifd it's possible plz provide some sample code.
Answer
# 3
I want to add some points reply of Sreekanth Madamanchi.
1. DynaAction class should be used only when you are having
more then one action on you form.
2. JSP must have same action name as of method in the action
class
 
Is This Answer Correct ?    0 Yes 0 No
Naman Patidar
 

 
 
 
Other Struts Interview Questions
 
  Question Asked @ Answers
 
what is BUSINESS DELIGATE PATTERN,DAO,VO,DTO? TCS6
how can you switch onemodule to another module by switch action class plz explain with exapmle? Satyam1
i have 500 jsps in my application,and i have same forward name for each jsp,so it lokks in strutsconfig.xml,from 1 to 500,but i want send 498 page directly,how can i cingigure my application TCS2
In Struts Programming which is the controller,which is the model?  10
tell me struts flow ? Fidelity4
i have list of values(e.g 100). using logic:iterate, how can i print the multiples of 5th element? how the logic:iterate will understand the multiples of 5. CTS2
what is difference between <bean:write> and <bean: message> tag CTS2
multiple instances for action class is it possible iFlex7
What is Request Dispatcher and What is reuest Processor??  2
wahts the diif between Mvc1 and Mvc2? Wipro3
How to forward from Array List to Jsp in Struts ActionServlet class?  6
struts is thread safe or not ?give me answer as early as possible  2
how handle when client send multiple request at atime for single servlet IBM3
What are Struts properties? VI-eTrans2
What is difference between perform() used in struts1.0 and execute() used in 1.1 ? Infotech2
Where can i get jar file for use the struts-tags in struts2?  1
How to explain struts work flow TCS5
what is the difference between ServletContext and ServletConfig?  4
How to create validations?what are struts validation components?  1
How display data base errors on web console by using the Struts Framework?  1
 
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