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
79
votes
3 answers

What's the difference between # , % and $ signs in Struts tags?

I'm working with Struts 2 and when I'm accessing ValueStack variables I don't know whether to use % or # or $. I try all of them until I find the correct one. Can anybody explain what is the difference between them?
Khashayar
  • 2,014
  • 3
  • 22
  • 31
61
votes
1 answer

struts2 optiontransferselect retrieve and display value from database

In the jsp page, I have a for swap values between left side and right side and a submit button to save.
Learner
  • 727
  • 4
  • 13
47
votes
8 answers

Struts2 vs Spring 3

Does anyone know difference between Struts2 and Spring 3 MVC. I know the difference between Struts 1 and Spring 2.5, but what's the advantage Struts2 has over Spring 3 or otherwise. I tried looking all over web, but there is no comprehensive answer…
Vivek
  • 957
  • 4
  • 12
  • 18
44
votes
15 answers

Tomcat exception Cannot call sendError() after the response has been committed?

While doing some operations in my application I got java.lang.IllegalStateException Cannot call sendError() When I reload the page again it work some time properly, but after some time again it shows the same exception. How can I overcome this…
user3117840
40
votes
15 answers

How can I set the welcome page to a struts action?

I have a struts-based webapp, and I would like the default "welcome" page to be an action. The only solutions I have found to this seem to be variations on making the welcome page a JSP that contains a redirect to the action. For example, in…
mrowe
  • 841
  • 1
  • 7
  • 6
39
votes
4 answers

Struts2 + Spring Security 2.06: Valuestack is null when attempting to use @Secured on an Action method

Before I begin, I've to say the closest answer I've found is here but honestly I don't really understand what's going on there. I'm using Struts2 + Spring Security 2.06 with a custom authentication provider and access decision manager to remove the…
shaunlim
  • 4,384
  • 6
  • 33
  • 38
34
votes
9 answers

Maven 3 Artifact problem

I made a new struts project in eclipse using the struts2-archtype-starter. A few errors where in my project already before doing anything. Solved most of them but there is 1 the still give me some problems. Missing artifact…
Mark Baijens
  • 13,028
  • 11
  • 47
  • 73
28
votes
6 answers

How to do dynamic URL redirects in Struts 2?

I'm trying to have my Struts2 app redirect to a generated URL. In this case, I want the URL to use the current date, or a date I looked up in a database. So /section/document becomes /section/document/2008-10-06 What's the best way to do this?
Sietse
  • 7,884
  • 12
  • 51
  • 65
27
votes
3 answers

Whitelist security constraint in web.xml

I'm using Tomcat for my Struts2 application. The web.xml has certain entries as shown below: restricted methods /*
Mike
  • 7,606
  • 25
  • 65
  • 82
26
votes
5 answers

Why should I learn and use struts?

I'm a java developer, not seasoned, but I am familiar with most concepts reasonably well. I recently built a website using Tomcat/JSP (~30 dynamic pages). I made the newbie mistake of including large sections of core logic in the JSP, using the…
David Parks
  • 30,789
  • 47
  • 185
  • 328
26
votes
2 answers

Getting a 'No thread-bound request found' error from spring in my web app

I'm getting a 'No thread-bound request found' error in my web app and hoping to get some help. I'm trying to use struts2 + spring + hibernate, and use spring to manage the hibernate session factory, and inject hibernate sessions into my struts…
Chris
  • 39,719
  • 45
  • 189
  • 235
24
votes
1 answer

How to display selected file names before uploading multiple files in Struts2?

I am using Struts2 to upload multiple files: When I select multiple files it displays the number of files, eg. 3 files. The project requirements are that the user should be able to see what files he…
Pradnya
  • 649
  • 2
  • 6
  • 17
23
votes
6 answers

Filters vs Interceptors in Struts 2

What's the difference, really, between filters and interceptors? I realize that interceptors fire before and after an action, recursively, and filters can be configured to fire on actions and on certain url patterns. But how do you know when to…
JPC
  • 8,096
  • 22
  • 77
  • 110
23
votes
3 answers

can not access a member of class org.springframework.aop.TruePointcut with modifiers public

I am developing a Spring application using Struts and the Struts JSON plugin. When I run the application it gives the following error (in Firebug): org.apache.struts2.json.JSONException: org.apache.struts2.json.JSONException:…
Pradeep Gamage
  • 585
  • 4
  • 8
  • 21
23
votes
2 answers

applicationContext.xml with datasource or hibernate.cfg.xml. Difference?

Want to clear some confusion. I have applicationContext.xml. Question 1: Whats the difference between 1 & 2. Are they both same with different approach? Question 2: I asked question on Spring forum regarding some problem. Onething he mentioned…
Pirzada
  • 4,685
  • 18
  • 60
  • 113
1
2 3
99 100