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
11
votes
5 answers

Java EE 6 and alternatives

I am a Java SE developer but I have rich web-background (PHP, Perl/CGI and so on) and now I am starting new project. It will have web interface, spaghetti business logic, relational database as storage and connections to other services. I do it from…
Ilya K
  • 119
  • 1
  • 1
  • 4
10
votes
3 answers

Check empty string in jsp

How to check for Empty String/Null String in Struts-JSP page. Struts Tag - does not works?
minil
  • 6,895
  • 16
  • 48
  • 55
10
votes
3 answers

What is the role of Spring in Struts + Spring + Hibernate?

What role is Spring taking in Struts + Spring + Hibernate?
JSON
  • 5,131
  • 4
  • 20
  • 15
10
votes
2 answers

where to handle spring DataAccessException

I develop an application using Struts, Spring, and Hibernate. My DAOs uses spring jdbc and all its method throws DataAccessException(that is uncheked). Where should I handle this exceptions? I know it's an unchecked exception but I think I need to…
rohit
  • 602
  • 4
  • 11
  • 24
9
votes
3 answers

Are there techniques to prevent double submissions in stateless web applications?

I want to implement double submission prevention in an existing java web application (struts actually). Architecture wise we are talking about 2 to N possible application servers (tomcat) and one single database server (mysql). The individual…
9
votes
2 answers

How to prevent JPA from rolling back transaction?

Methods invoked: 1. Struts Action 2. Service class method (annotated by @Transactional) 3. Xfire webservice call Everything including struts (DelegatingActionProxy) and transactions is configured with Spring. Persistence is done with…
D. Wroblewski
  • 7,530
  • 4
  • 27
  • 30
9
votes
4 answers

How can I refactor HTML markup out of my property files?

I've recently inherited a internationalized and text-heavy Struts 1.1 web application. Many of the JSP files look like:

and the properties files look like: messages.properties alert=Please update your
Brian Laframboise
  • 5,504
  • 2
  • 31
  • 32
9
votes
3 answers

Struts Tags vs. JSTL

Struts has a number of helpful custom JSP tags, and Struts-EL adds much needed EL support. I'm looking for thoughts on relative merits of using Struts/Strut-EL tags where available vs. just using JSTL tags.
Edward Shtern
  • 5,177
  • 5
  • 24
  • 24
8
votes
4 answers

Making Struts send 500 Internal Server Error when exceptions get thrown

I'm working on an AJAX-enabled JavaScript frontend that makes calls to a Java backend written with Struts. My problem is that when the backend throws an exception, the client still sees a "200 OK" HTTP response code instead of "500 Internal Server…
curtisdf
  • 4,130
  • 4
  • 33
  • 42
8
votes
2 answers

Has anyone migrated from Struts 1 to another web framework?

On my current project, we've been using Struts 1 for the last few years, and ... ahem ... Struts is showing its age. We're slowly migrating our front-end code to an Ajax client that consumes XML from the servers. I'm wondering if any of you have…
Alan
  • 7,066
  • 5
  • 30
  • 38
8
votes
1 answer

Struts 1 ActionForms - What's the convention for dates in the form?

I am about to start with e project that uses Struts 1.2. There is no plan to move to another framework. I wanted to know what's the convention when handling a date in the form? Should I create a Date variable and create a setDate(String date)…
Farid
  • 1,542
  • 3
  • 18
  • 27
8
votes
5 answers

why are struts Action classes not thread safe?

I can read in many websites that Struts Action classes are not thread safe . I am not able to understand why this is so . Also I read a book which says "Struts action classes are cached and reused for performance optimization at the cost of having…
Vinoth Kumar C M
  • 10,378
  • 28
  • 89
  • 130
8
votes
4 answers

Using Hibernate session with quartz

I've a web application which uses framework like Struts and Hibernate. Currently I'm developing a scheduler for this application using Quartz. While coding I realized that the use of Hibernate session is not possible with the threads of Quartz.…
Sastrija
  • 3,284
  • 6
  • 47
  • 64
8
votes
2 answers

Struts 1 - How to display ActionMessages

I am displaying ActionMessages through a JSP file by the following command:
Amit
  • 33,847
  • 91
  • 226
  • 299
8
votes
1 answer

Can`t uncheck all in Struts Multibox

I have a j2ee application running on weblogic. I was confused with my multibox. What I know of multibox is that the checked items will be passed as an array of strings on submit. I don`t know why in my application it works fine when i uncheck a…
cedric
  • 3,107
  • 15
  • 54
  • 65