When wil use singleton class in Struts

Answer Posted / nikel

In struts 1.x version Action class follows Single Instance Multiple Threaded model.hence WebContainer creates object for a Action class per Session basis.so Action class is not ThreadSafe.But we can make it ThreadSafe by Synchronization mechanism.

But in Struts 2.x version Action class obj is created by WebContainer per request basis.So Action class is always threadsafe.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is struts actionmapping?

529


What is spring hibernate and struts in java?

492


Explain about the process of functioning of the struts program?

593


How many instances of servlet usually run in a struts application ?

544


What are action errors and error?

580






What are the classes used in struts?

632


How can we upload files in Struts2 application?

592


What is the use of lookupdispatchaction?

566


What is the purpose of @requiredstringvalidator?

564


Why it called struts?

561


How client side validation is enabled on a jsp form?

592


What is struts in j2ee?

530


What are the steps required for setting up validator framework in struts?

567


What is the purpose of @conversion annotation annotation?

599


What are the two different types of validations that the validator framework supports?

531