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
15
votes
4 answers

org.xml.sax.SAXParseException: Document is invalid: no grammar found.

I'm getting the errors in my Struts application, on my development machine, saying apparently my config files have errors (which I already checked and seem ok): org.apache.commons.digester.Digester error SEVERE: Parse Error at line 3 column 15:…
Rui
  • 5,900
  • 10
  • 38
  • 56
14
votes
4 answers

POST method getting converted to GET in IE-9

I have this line of code in my JSP. (I'm using struts 1.3) . . . When the action corresponding to mine.do is invoked (using struts-config.xml), the page is getting submitted as GET…
SrinivasKalburgi
  • 311
  • 2
  • 11
14
votes
3 answers

Basic flow of Struts

Well I want to study Struts so I am going to begin with Struts 1, I would like to know the general flow. What files are required? Whats the function of struts-config.xml? validation.xml? validation-rules.xml When you visit your JSP page, and an…
user478636
  • 3,304
  • 15
  • 49
  • 76
14
votes
2 answers

EntityManager ThreadLocal pattern with JPA in JSE

I'm developing a simple "Book Store" project using Struts 1.3 + JPA (with Hibernate as persistence provider). I cannot switch to Spring or any other more sophisticated development environment (e.g., Jboss) and I cannot use any Hibernate-specific…
Ilio Catallo
  • 3,152
  • 2
  • 22
  • 40
13
votes
3 answers

how to connect hibernate and DB2

I am running an application that used struts and hibernate. I am currently using Derby database. Now i have to shift on DB2 database. Please tell me what Configuration I have to do in hibernate configuration file? Do I have to set any…
Muhammad Imran Tariq
  • 22,654
  • 47
  • 125
  • 190
13
votes
6 answers

struts.xml and struts-config.xml

What is the difference between struts.xml and struts-config.xml? Are both the same or is there any difference between them?
bharanitharan
  • 2,539
  • 5
  • 32
  • 30
13
votes
5 answers

How to get the real request URL in Struts with Tiles?

When you're using Tiles with Struts and do... request.getRequestURL() ...you get the URL to e.g. /WEB-INF/jsp/layout/newLayout.jsp instead of the real URL that was entered/clicked by the user, something like /context/action.do. In newer Struts…
eltehaem
13
votes
10 answers

Can I propagate struts2 ActionErrors between different action classes?

If I have an action where the result is a redirectAction to another action in a different class, is it possible to get validation errors to display in the resulting action? E.g. in the following example, if a user executes actionA (which has no…
sk.
  • 6,336
  • 5
  • 38
  • 46
13
votes
4 answers

Difference between Interceptors and Filters - Is this right?

I'm researching this so that I can respond better in interviews. I've been searching around for a clear and concise answer. So far, and by all means correct me if I am wrong or lacking in detail: Filters are part of the Servlet API, Interceptors…
user447607
  • 5,149
  • 13
  • 33
  • 55
12
votes
2 answers

How to use an enum in Struts html:select tag

I am currently trying to create a html:select tag from an enum so it could be set in a specific object: class someClass { SomeEnum someProperties = null; public getSomeProperties() { return someProperties; } public…
Drahakar
  • 5,986
  • 6
  • 43
  • 58
12
votes
2 answers

Examples of Websites built using Spring, Play Framework, Struts

I am a beginner in Java and going to build a webapp that allows developers to work online on their projects. Something of the sort of bitbucket or github. I have developed sites using PHP and moving away from it. I was suggested that I should go…
Conceicao Adik
  • 121
  • 1
  • 1
  • 4
12
votes
2 answers

How to create payment gateway for an online transaction?

In my web application there is an online transaction system for online reservation. I have no idea about how to implement this, i.e when an end user wants to do reservation, a form has to open showing different banks, by selecting bank, user will be…
Lokesh
  • 127
  • 1
  • 1
  • 4
12
votes
4 answers

What does the exception "javax.servlet.jsp.JspException: Broken pipe" signify?

I'm getting the following error: javax.servlet.jsp.JspException: Broken pipe Now I have seen questions/answers with respects to the socket exception, but this error is coming from a different package. Any help is greatly appreciated. BTW, I am…
Ruepen
  • 411
  • 5
  • 8
  • 19
12
votes
2 answers

Servlets vs MVC frameworks

I very often come across this question of why we have got lots of web frameworks addressing the same or similar drawbacks. When looking deeply, I also have given thought on why JSP / Servlets is not being used after the other web frameworks (like…
Jegan Kunniya
  • 986
  • 3
  • 17
  • 27
12
votes
2 answers

Why do we need global-forwards and global-exceptions in struts?

I have a basic question in struts why do we need to have and in struts-config.xml. If we can achieve the same things with itself.
user1900662
  • 299
  • 1
  • 7
  • 26