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 java struts?

534


What is controller in struts ?

528


What is struts xml?

437


What do you mean by tiles in struts?

540


Explain struts?

551






Do I have to credit struts on my own website?

528


What is the purpose of global-forwards tag in struct-config.xml?

576


Are actions thread safe?

535


What’s the utilization of resource bundle properties file in struts validation structure?

621


Can you explain custom tag?

570


What is defeult result type?

625


Explain about the tag?

623


What is the difference between filters and interceptors ?

495


What is container struts2?

523


What are apache struts?

507