Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Is Action Class is threadSafe in Struts?

Posted on 2008-11-05
Medium Priority
Last Modified: 2013-11-24
Is Action Class(user define Action Class) is threadSafe in Struts by defaul?
MyAction extends Action {
execute(, , , ,) {
  IF this class(MyAction) is thread safe then is the methods of all the classes(Bussiness, DAO) that called in execute() method is thread-safe(means no need to worry about thread safty in Struts application)
Question by:Asheesh_Kumar
LVL 14

Accepted Solution

boonleng earned 2000 total points
ID: 22891747
Struts 1 action are singleton and worked same like servlet which there is only one instance shared by multiplethread. Methods called in the execute() method are thread-safe as long as they are not a new instance declared as local variable in the action class.

Here is the guideline on how to design the action class in struts 1:

Struts 2 action are instantiated on each request, so you wont have the problem face in Struts 1.

Expert Comment

ID: 22894855
sorry for the disturb,

boonleng could  u plz have a look at this problem og  gettting back param from each html:text to html:link


Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Developer tools in browsers have been around for a while, yet they are still heavily underused by developers. Developers still fix html or CSS then refresh page to see effect, or they put alert or debugger in JavaScript and then try again and again …
What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
Wufoo.com provides powerful tools for surveying targeted groups, and utilizing data from completed surveys to find trends, discover areas of demand or customer expectation, and make business decisions on products or services.
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to selectively show certain fields based on user input using rules to gather relevant information and data from your forms. The rules feature provides you with an opportunity…
Suggested Courses

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question