Questions tagged [struts2]

Apache Struts 2 is an extensible framework based on servlets and implements model–view–controller (MVC) pattern in its architecture for creating enterprise-ready Java web applications.

Apache Struts 2 is an extensible framework based on servlets and implements (MVC) pattern in its architecture for creating enterprise-ready Java web applications. The framework is designed to streamline the full development cycle, from building, to deploying, to maintaining applications over time.

It uses and extends the Java Servlet API to encourage developers to adopt a model–view–controller (MVC) architecture.

Apache Struts 2 was originally known as WebWork 2. After working independently for several years, the WebWork and Struts communities joined forces to create Struts2. This new version of Struts is simpler to use and closer to how Struts was always meant to be.

Features of Struts2

  • Simple POJO-based actions
  • Simplified testability
  • Thread safe AJAX support
  • Template support
  • Support for different result types
  • Easy to extend with plugins


References

Related tags :

11368 questions
12
votes
2 answers

Mapping Struts 2 Exception Handler to an Action

I have Struts 2 configured to redirect any java.lang.Exception to a special Action which logs the exception. My redirection works, but my Action always gets a null exception (even when I explicitly throw an Exception). Here is my struts.xml…
David
  • 299
  • 2
  • 6
  • 16
12
votes
2 answers

Struts2 JSON Plugin: Adding ActionMessages, ActionErrors, and FieldErrors to response

I am making JQuery Ajax posts and would like any actionmessages, actionerrors, and fielderrors added to in the action back in the response (in JSON format). I added this result:
icats
  • 959
  • 3
  • 13
  • 24
12
votes
1 answer

Action redirect in struts.xml

Can I redirect to another action from within a struts actions ? So the result of an action is another action i.e - here is a snippet of struts.xml formsearch
blue-sky
  • 51,962
  • 152
  • 427
  • 752
12
votes
2 answers

Serve static files (JavaScript) with Struts 2

I want to put some JavaScript files in one of my packages and make Struts serve them like /struts/js/foo.js Struts does that for files in 'template' package (that's where jQuery plugin's files are located, guarded by struts.ui.templateDir option).…
alamar
  • 18,729
  • 4
  • 64
  • 97
12
votes
4 answers

Why .txt file in