When wil use singleton class in Struts

Answer Posted / avani

Struts will create a single instance of the Action and
allow multiple threads to invoke execute(). This allows for
faster request processing, as the framework is not
continually creating new Action instances to handle each
request. But because a single object is shared between
multiple threads, you must observe proper threading
considerations, as other threads are likely to pummel
instance variables that hold state in the action.

Is This Answer Correct ?    10 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the purpose of @stringlengthfieldvalidator annotation?

598


What is ognl?

598


How can duplicate form submission be handled in struts 2?

535


Describe validate() and reset() methods.

600


What is struts 2 framework in java?

537






What are the components of struts framework?

579


What is Struts2?

618


What is the purpose of @customvalidator annotation?

569


What is the role of action class in struts?

556


What is action support class in struts2?

563


Why it called struts?

557


Which model components are supported by Struts?

565


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

566


What is the use of Struts.xml configuration file?

511


What is the procedure of operation of a form tag?

550