Is struts thread safe?

Answer Posted / javablossom

struts 1.x is threadsafe and struts 2.x is not thread safe
Reference:
In Struts1, Action resources must be thread-safe or
synchronized. So Actions are singletons and thread-safe,
there should only be one instance of a class to handle all
requests for that Action. The singleton strategy places
restrictions on what can be done with Struts1 Actions and
requires extra care to develop. However in case of Struts
2, Action objects are instantiated for each request, so
there are no thread-safety issues.

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

523


Explain the difference between dispatchaction and lookupdispatchaction in struts?

2114


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

582


What is the use of lookupdispatchaction?

561


How is declarative handling of exceptions done in struts ?

478






Can you explain the directory structure for a struts folder in brief ?

524


Which class of struts is responsible to converts data types from string and vice versa?

663


What is spring and struts in java?

511


What are action errors?

569


What are different ways to create Action classes in Struts2?

593


What is interceptor? And life cycle methods of interceptor?

571


Do I have to credit struts on my own website?

535


Are interceptors and filters different?

545


Explain about the library tag?

597


What is the role of a handler in mvc based applications?

749