adspace


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 do you know about validation plugin ?

1031


What is the difference between filters and interceptors ?

1316


What are the contents on web.xml in struts application ?

1072


How is declarative handling of exceptions done in struts ?

1010


What is action chaining ?

1168