Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Can i use constructor in Action Class?If yes how?

Answers were Sorted based on User's Feedback



Can i use constructor in Action Class?If yes how?..

Answer / kumar

Yes, we can have a constructor, but there is no use even if
you invoke explicitly because container itself is providing
a zero argument constructor implicitly.

Is This Answer Correct ?    9 Yes 0 No

Can i use constructor in Action Class?If yes how?..

Answer / manjunath more

public class MyAction extends Action{

public MyAction(){

}

public ActionForward execute(ActionMapping
mapping,ActionForm form,Request,Resopnse){

//some code

}

}

This will work...

It means you can write constructor in Action classes.

If you have any queries drop me a mail on
manjunathmore@gmail.com

Is This Answer Correct ?    6 Yes 0 No

Can i use constructor in Action Class?If yes how?..

Answer / sekhar babu

Yes we can write the constructor for the Action clas rule is
Constructor should not have arguments ,
If we provide with arguments we should also proide no
argment constructor

Is This Answer Correct ?    6 Yes 1 No

Can i use constructor in Action Class?If yes how?..

Answer / rameshkrishna

ActioClass is on of the servet and it is superclass of
javax.servlet.HTTP.HTTPServlet.In the servet there is
possiblity of write zeroorgumen consrtacter but can't write
perametarised cunstracter becouse of perametarised
constrater can't read container...

Is This Answer Correct ?    6 Yes 2 No

Can i use constructor in Action Class?If yes how?..

Answer / kamal hossain

yes, we can use zero argument constructor for initialisation.

Is This Answer Correct ?    5 Yes 1 No

Can i use constructor in Action Class?If yes how?..

Answer / devender

Yes action class can have constructor but what is the
advantage of that constructor

Is This Answer Correct ?    7 Yes 5 No

Can i use constructor in Action Class?If yes how?..

Answer / hem

no

Is This Answer Correct ?    5 Yes 7 No

Can i use constructor in Action Class?If yes how?..

Answer / sagar

No you cant use Constructor in Action class,
if you use it will unable to find action class
and gives Error Msg( No action instance for path )

Is This Answer Correct ?    0 Yes 10 No

Post New Answer

More Struts Interview Questions

What is token used for?

0 Answers  


What’s the difference between validation.xml and validator-rules.xml files in struts validation framework?

0 Answers  


What is the differences between struts1 and struts2?

0 Answers  


What is the main difference between Mvc1 and Mvc2 Architecture??

7 Answers   IBM, Ness Technologies,


What is the use of jsonvalidation?

0 Answers  


What is struts-default package and what are it’s benefits?

0 Answers  


Why should we go for struts framework?

5 Answers   Accenture,


Explain the difference between dispatchaction and lookupdispatchaction in struts?

0 Answers  


What should be the name of xml file used for validation in struts?

0 Answers  


What is Struts Flow?

17 Answers   CTS, rsystems,


can anyone help me to send the code for Jasper Reporting in java?plz

3 Answers   CSC, RFT,


Why we use struts over servlets?

0 Answers  


Categories