Is it possible to create mulitple instance of one Action
Class in struts?

Answer Posted / sitaram

Only one instance of action class is created per
application, as we know for each request container will
create separate thread hence for 100 request 100 theads will
be creates and that 100 request can handle
concurrently...(which is executing execute() method of
action class's single instance) i.e. you can say class
variable of action class is not at all thead safe.

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How does interceptor work in struts2?

708


What is the difference between plain-validator and field-validator?

721


What is front controller in struts?

743


How many struts config file can be created in struts?

659


What is the purpose of @stringlengthfieldvalidator annotation?

822


What is the purpose of @intrangefieldvalidator annotation?

1058


What is includeaction?

762


What is struts actionmapping?

700


What does it cost to replace struts?

704


Can you explain custom tag?

765


How you will enable front-end validation based on the xml in validation.xml?

771


How the flow of various requests happens in struts application?

748


Why use struts framework in java?

741


Which technologies can be used at view layer in struts?

864


What is structs 2 validation framework?

757