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       Ask Questions on ANYTHING, that arise in your Daily Life at     FORUM9.COM
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
 
how can u handle run time exceptions in struts and jsp plz explain briefly not single word answer? TCS2
What is meant by portals???  6
How to explain struts work flow TCS5
why do we typecast ActionForm into out plain java bean class in Action class?  5
Where can i get jar file for use the struts-tags in struts2?  1
project architechture in java IBM2
Difference between JSF Framework and Struts Framework. Accenture8
is it possible to see actionservlet in my system. if yes how  5
Hi Friends, why struts introduced in to web application. Plz dont send any links . Need main reason for implementing struts. Thanks Prakash  2
In Struts Programming which is the controller,which is the model?  10
Is struts thread safe? HCL3
when connecting with the database,if database server is down,ho can we handle this exception in struts,how can we send error message to the user? Wipro4
What is Hibernate?  3
how to create a search field in struts.with code Infosys3
session menagement in servlets explaion briefly?  1
who will run the execute method in struts? Wipro7
what is ForwardAction and IncludeAction in struts? Mind-Tree2
How to forward from Array List to Jsp in Struts ActionServlet class?  6
whats is mean Actionerrors and Actionerror? Wipro4
What is the difference between a Strut and a Class?  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