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
22
votes
2 answers

Iterate over an HashMap> with Struts 2

I am currently facing some difficulties with Struts2 and the s:iterate tag. I want to display a label, which is the key in the HashMap, followed by a table (the value in the HashMap) containing every elements in the ArrayList, for each elements in…
Zeym
  • 239
  • 1
  • 2
  • 5
21
votes
4 answers

How to disable struts 2 Table generation for Form?

Struts 2 automatically generate HTML table for it's tag. How can I disable it? Any help will be appreciated. Thank You.
zawhtut
  • 8,335
  • 5
  • 52
  • 76
20
votes
6 answers

Missing artifact javax.transaction:jta:jar:1.0.1B ( Issue was different as you may see the resolution is different)

I am trying to learn Hibernate-Spring-Struts using the example Struts 2 + Spring + Hibernate integration example. But after creating the pom.xml getting this error : Missing artifact javax.transaction:jta:jar:1.0.1B I made a progress only up to…
VictorGram
  • 2,521
  • 7
  • 48
  • 82
19
votes
6 answers

Where to put struts.xml

With Struts2 we have to have struts.xml in the class path, so it no longer works to have it under WEB-INF. So the way I got my project to deploy was to stick it under WEB-INF/classes and have it include ../struts2.xml 2 Problems: Eclipse cleans out…
ariso
  • 1,433
  • 6
  • 21
  • 35
19
votes
2 answers

Error "HttpServletRequest refers to the missing type String"

I am implementing a project in struts in which I am getting an error in a JSP page. I have already configured Tomcat 6, the JRE and JDK 6 in Eclipce IDE. The code is: %request.getContextPath()% The error is: The method getContextPath() from the…
Yugal
  • 1,635
  • 8
  • 21
  • 30
17
votes
2 answers

Whats the difference between Struts 1.x and Struts 2.x

I would like to know the difference between Struts 1.x and Struts 2.x
Ashvin Ranpariya
  • 661
  • 2
  • 13
  • 25
17
votes
5 answers

struts2 - understanding the value stack

I have a question regarding the struts2 value stack. Let's say I have an Action class called RegisterAction that has an execute method as follows: public String execute() { ValueStack stack = ActionContext.getContext().getValueStack(); …
dcp
  • 54,410
  • 22
  • 144
  • 164
16
votes
4 answers

How to access url parameters in Action classes Struts 2

I'm new to Java EE and Struts2. I need to know if I'm doing it wrong or not. I've got a link like this : http://localhost:8080/myProject/deleteUser?idUser=42 All I want is to get the idUser value. Here is what I use to get the parameter value in my…
SupaCoco
  • 1,615
  • 2
  • 16
  • 23
16
votes
2 answers

what's the difference between #{} ${} and %{}?

I'm currently working with struts2, and I just don't understand what the difference is between ${var}, #{var}, and %{var} are they different scopes? what are they? I found an example of the #:
JKirchartz
  • 17,612
  • 7
  • 60
  • 88
16
votes
3 answers

FilterDispatcher is deprecated! - What is the replacement for FilterDispatcher?

How to avoid the following error? I am implementing Spring-Security on Struts2, the application runs perfectly but the following message will be shown on server log. WARNING!!! FilterDispatcher <<< is deprecated! Please…
J888
  • 1,944
  • 8
  • 42
  • 76
16
votes
6 answers

Format number in Struts 2 tag

I would like to format number displayed by tag in Struts 2. There is a double value. How can I do that? Should I use OGNL? Or maybe I must use tag and define my format in resuource file?
prostynick
  • 6,129
  • 4
  • 37
  • 61
15
votes
3 answers

Difference between servlet/servlet-mapping and filter/filter-mapping?

As part of exploring/learning Struts2, JSP and Servlets, I see from here and there that servlets and servlets-mapping can be used in web.xml. However, Struts2 mentions filters and filter-mapping too for web.xml. What is the difference between both?…
Jérôme Verstrynge
  • 57,710
  • 92
  • 283
  • 453
15
votes
10 answers

No result defined for action and result input

I am using Struts2 I get error as no result defines for action and result input /Project.jsp My action is not passing to my java class. Can…
jones
  • 151
  • 1
  • 1
  • 3
15
votes
3 answers

What are different ways to handle error in FreeMarker template?

How to suppress FreeMarker template error? I am looking here: http://freemarker.sourceforge.net/docs/pgui_config_errorhandling.html But I do not understand how to "TemplateExceptionHandler.IGNORE_HANDLER." I am using Struts2 and also how to show…
Noman Arain
  • 1,172
  • 4
  • 19
  • 45
14
votes
3 answers

Deploy Java Web application on Amazon Cloud

I have a web application developed with Struts2, JSP, JPA, Spring and MySql. I want to move this application to Amazon Cloud. I have not done a cloud deployment before or know how to do it. Can anyone help me on a step by step process or a procedure…
Uchenna Nwanyanwu
  • 3,174
  • 3
  • 35
  • 59