Questions tagged [struts]

The Apache Struts web framework is a free open-source solution for creating Java web applications.

The Apache Struts web framework is a free open-source solution for creating Java web applications.

Struts frameworks with different version significantly changed their architecture that is not backward compatible.

Struts 1.x has reached End Of Life status as of 2013-04-05 (see announcement).

Struts 2.x is the current stable releases version.

Struts 3.x is in development phase.

Web applications differ from conventional websites in that web applications can create a dynamic response. Many websites deliver only static pages. A web application can interact with databases and business logic engines to customize a response.

Web applications based on JavaServer Pages sometimes commingle database code, page design code, and control flow code. In practice, we find that unless these concerns are separated, larger applications become difficult to maintain.

One way to separate concerns in a software application is to use a Model-View-Controller (MVC) architecture. The Model represents the business or database code, the View represents the page design code, and the Controller represents the navigational code. The Struts framework is designed to help developers create web applications that utilize a MVC architecture.

The framework provides three key components:

  • A "request" handler provided by the application developer that is mapped to a standard URI.
  • A "response" handler that transfers control to another resource which completes the response.
  • A tag library that helps developers create interactive form-based applications with server pages.

The framework's architecture and tags are buzzword compliant. Struts works well with conventional REST applications and with nouveau technologies like SOAP and AJAX.

The Apache Struts Project is the open source community that creates and maintains the Apache Struts framework. The project consists of a diverse group of volunteers who share common values regarding collaborative, community-based open source development. The Apache Struts Project is proud to share these values with our parent organization: The Apache Software Foundation.

The project is called "Struts" because the framework is meant to furnish the "invisible underpinnings" that support professional application development. Struts provides the glue that joins the various elements of the standard Java platform into a coherent whole. Our goal is to leverage existing standards by producing the missing pieces we need to create enterprise-grade applications that are easy to maintain over time.

The Apache Struts Project offers two major versions of the Struts framework. Struts 1 is recognized as the most popular web application framework for Java. The 1.x framework is mature, well-documented, and widely supported. Struts 1 is the best choice for teams who value proven solutions to common problems.

Struts 2 was originally known as WebWork 2. After working independently for several years, the WebWork and Struts communities joined forces to create Struts 2. The 2.x framework is the best choice for teams who value elegant solutions to difficult problems.

Official Website: http://struts.apache.org/ ( Struts 2 / Struts 1 )

Useful Links:

Related tags :

3606 questions
6
votes
1 answer

Combobox not show the correct language values in struts1

Im using ExtJS and Struts1 for an application, when user uses this app in english and displays the combobox (inside form), the selection is in another language (spanish) but not in english. After save the form and reload the page this parameter…
S. Moreno
  • 526
  • 2
  • 7
  • 29
6
votes
1 answer

Can you do a struts2 action redirect using POST instead of GET?

OtherActionparam> ${someParams} ${someParams}
Andy
  • 8,841
  • 8
  • 45
  • 68
6
votes
4 answers

Struts - In which jar file all the .tld files located

I am developing a Struts based web application. I am new to Struts. I want to use struts-html.tld taglib, provided by struts, in my jsp pages. When I searched on net, I came to know that prior to Struts 1.2.9, we need to locate the .tld files…
Amit
  • 33,847
  • 91
  • 226
  • 299
6
votes
1 answer

AJAX with Struts 1.x Version

I am having an application developed with Struts1.3, Jboss4.X version and jdk1.5 Now as an enhancement we are planning to implement AJAX to the web application Can you please suggest me Whether I can use AJAX with Struts1.3 Framework? Which Jar I…
gmhk
  • 15,598
  • 27
  • 89
  • 112
6
votes
4 answers

"Path login.page does not start with a "/" character" message exception after changing java version

I have a web application which worked with the following: Tomcat 5.0 Struts 1.0 Java 1.5 I have to switch to Java 1.6.When I tried to do that, i received the following stack of exception in my browser: javax.servlet.ServletException: Path login.page…
Anca Z
  • 61
  • 1
  • 2
  • 4
6
votes
1 answer

Catch-all servlet filter that should capture ALL HTML input content for manipulation, works only intermittently

I need a servlet filter that will capture all input, then mangle that input, inserting a special token in every form. Imagine that the filter is tied to all requests (E.g. url-pattern=*). I have the code for capture of content, but it doesn't seem…
Berlin Brown
  • 11,504
  • 37
  • 135
  • 203
6
votes
2 answers

how to allow hyphens using regex

I want the user to enter hyphens with the following code mask ^[a-zA-Z0-9]*$ I am using struts validation. so please help me to address this. EDIT the user can enter the hyphens…
Joe
  • 4,460
  • 19
  • 60
  • 106
6
votes
2 answers

What type should Struts ActionForm properties be?

I inherited this gigantic legacy Java web app using Struts 1.2.4. I have a specific question regarding ActionForms. Some of them have only String properties (even for numbers), some of them use the seemingly appropriate types (Integer, Date, String,…
thvo
  • 1,532
  • 2
  • 15
  • 29
6
votes
3 answers

How can I obtain the message resources object in a servlet?

I'm developing a project with Struts and I was wondering if it's possible to get the message resources object in a servlet, which is included in the same project. There's no possibility to get that object with the method…
Carlos Pastor
  • 979
  • 2
  • 11
  • 26
6
votes
4 answers

Java server cpu usage at 100% after two days continous running with about 110 users

I have a tomcat 6.0.20, apr 1.2, jdk 1.6.0_15 with mysql 5.1.38 running on a rhel box with 4 GB ram. There is one simple jsp/servlet application on it with 5 users, one struts 1.2.0.9 with 64 users on it and one struts 2.0 application with 35 users…
sam
  • 61
  • 1
  • 3
6
votes
1 answer

How do I specify HTML5 attributes with Struts 2.x?

I make extensive use of Struts2 in my application. Now I want to add HTML5 attributes like autocorrect and type="email". I don't see any HTML5 plugin. Is there a standard way to the tag for example?
Nic Cottrell
  • 9,401
  • 7
  • 53
  • 76
5
votes
3 answers

Redirect or forward

Looking through some legacy code I have in front of me using struts one, I see: ... So it's just a global forward to…
dublintech
  • 16,815
  • 29
  • 84
  • 115
5
votes
1 answer

Populate Collection from Struts2 Form Submission

I'm trying to populate a List of beans from a form: public class Foo { public String attr1; public String attr2; } public class Bar { public List foos; } public class StrutsAction extends Action { public Bar bar; } So in my…
Droo
  • 3,177
  • 4
  • 22
  • 26
5
votes
3 answers

HTTP Status 500 - No action instance for path /adduser could be created in struts

I have a JSP page in which there is a hyperlink to add a user. Add New User < /html:link> My struts-config file contains
vikiiii
  • 9,246
  • 9
  • 49
  • 68
5
votes
3 answers

How to use foreach in struts

I have this struts code where I am using forEach- I have added this taglib <%@ taglib…
Khoyendra Pande
  • 1,627
  • 5
  • 25
  • 42