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

Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException:

I am creating web application using Spring, Hibernate, Struts, and Maven. I get the below error when I run mvn clean install command: org.springframework.beans.factory.BeanCreationException: Error creating bean with name…
KItis
  • 5,476
  • 19
  • 64
  • 112
20
votes
4 answers

Get current filename in JSP

Is there a way to get which JSP is currently rendered, with JSTL or Struts (or without)? like _ _ file _ _ in Python and PHP?
elzapp
  • 1,961
  • 4
  • 15
  • 22
20
votes
3 answers

Hibernate NoSuchFieldError INSTANCE but only with Struts 1?

I'm new to Java and Hibernate (being a Rails and C# developer). Anyway, I have a test program that works fine with Hibernate but my actual web app (Struts 1) crashes with: SEVERE: Servlet.service() for servlet default threw…
cbmeeks
  • 11,248
  • 22
  • 85
  • 136
19
votes
4 answers
17
votes
2 answers

How to fetch hibernate query result as associative array of list or hashmap

I am developing an application in struts 2 and hibernate 3. I have 3 tables Inspection InspectionMission Timeline Inspection is associated with InspectionMission and InspectionMission is associated with Timeline. Now I have following problem. I…
amar4kintu
  • 831
  • 11
  • 21
  • 32
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

Prevent IE caching

I am developing a Java EE web application using Struts. The problem is with Internet Explorer caching. If an user logs out he can access some pages because they are cached and no request is made. If I hit refresh it works fine. Also if an user goes…
GorillaApe
  • 3,611
  • 10
  • 63
  • 106
17
votes
3 answers

Firefox cuts files, whose name contains spaces, in a Struts application

I am using the next class (simplified for the sake of understandability) to download images in a struts web application. It is working fine in every browser but firefox, which cuts names containing spaces. That it is to say: file with spaces.pdf…
Sergio del Amo
  • 76,835
  • 68
  • 152
  • 179
16
votes
3 answers

Difference between Oracle ATG and Struts?

What is the difference between Oracle ATG and Struts?
chetan
16
votes
6 answers

AJAX vs Form Submission

We pull data from server and for that If we are using Struts, then we can pull either by submitting a page which MVC Architecture or we cam make an AJAX call but conventions is of using forms and render response but we also face challenges to give…
Vardan Gupta
  • 3,505
  • 5
  • 31
  • 40
16
votes
2 answers

MySQLNonTransientConnectionException: No operations allowed after connection closed.Connection

I built an web application and deployed locally working perfect. I deployed it on a remote server and started getting the : exception > javax.servlet.ServletException: could not execute query…
Atul Thakre
  • 502
  • 3
  • 8
  • 24
15
votes
3 answers

Cannot create message: incorrect content-type for SOAP version. Got text/xml; charset=UTF-8, but expected application/soap+xml

I am trying to use the large merchant services API provided by eBay to upload files onto eBay. They have provided with a sample.jar file of the same. It seems to be working fine when we execute the .jar file on the command prompt, but when i am…
Amit
  • 353
  • 3
  • 6
  • 16
15
votes
4 answers

Denying direct access to jsp pages

I'm using struts 1.3 for my application and all jsp pages are forwarded through controller (action class). But If I access the jsp page directly, I'm able to access it. How do I prevent this?
Shwetanka
  • 4,976
  • 11
  • 44
  • 68
15
votes
3 answers

OSGi vs Spring vs Struts vs EJB vs. Hibernate -- a totally newbie's question

I am not familiar with these "framework" "components" at all, but can someone give me a 101 introduction about what the relationship they are to each other? Basically, I want to know roughly about: what and what are counterparts to each other what…
sean
  • 159
  • 1
  • 1
  • 4
15
votes
10 answers

How do I access Locale from a JSP?

I want to include a js file depending on the value of the current Locale. I have tried to access it from JSP as follows: <%@ page import="java.util.Locale" %> <% if( ((Locale)…
Sergio del Amo
  • 76,835
  • 68
  • 152
  • 179