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
What does apache struts do?
Can we have more than one struts-config.xml file for a single struts application?
How is token generated?
What is struts in java with example?
Can you explain struts.properties in struts2?
Where should struts xml be placed?
What is struts2 namespace?
Which interceptor is responsible for mapping request parameters to action class Java Bean properties?
What is front controller in struts?
What is the purpose of @urlvalidator annotation?
What are inner class and anonymous class?
Name the different types of actions found in struts.
What is pojo in struts2?
What is the purpose of @stringlengthfieldvalidator annotation?
How can we display all validation errors to user on jsp page?