Answer Posted / vijay
Struts 1 Actions are singletons and must be thread-safe
since there will 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 Struts 1 Actions and
requires extra care to develop. Action resources must be
thread-safe or synchronized.
Struts 2 Action objects are instantiated for each request,
so there are no thread-safety issues. (In practice, servlet
containers generate many throw-away objects per request, and
one more object does not impose a performance penalty or
impact garbage collection.)
| Is This Answer Correct ? | 53 Yes | 16 No |
Post New Answer View All Answers
Can you explain struts.properties in struts2?
Difference between struts and spring? Or why use spring, if you are already using struts?
What is the use of resourcebundle.properties file in Struts Validation framework?
How to get data from the velocity page in a action class?
What is http forward?
How you will display validation fail errors on jsp page?
Explain about the process of functioning of the struts program?
What’s the difference between validation.xml and validator-rules.xml files in struts validation framework?
What is the difference between empty default namespace and root namespace?
What is struts.devmode?
What do you mean by actionservlet?
What do struts do?
Why are struts tightly coupled?
What is jakarta struts framework?
What is the purpose of @element?