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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is actioninvocation in struts2?

770


Can we use struts and spring together?

721


How struts2 supports internationalization?

872


Why it called struts?

722


How to handle exceptions in structs?

758


What do you mean by ognl?

741


What are the action classes in struts?

739


How many action classes can be used in struts application?

705


Explain the core end goal while using java struts?

691


What is the front controller in struts2?

681


How to get data from the velocity page in a action class?

732


Which interceptor is responsible for file upload support?

785


What are action errors?

729


What is the use of token interceptor in Struts2?

828


What configuration changes are required to use resource files in Struts?

766