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
62
votes
1 answer

test the localhost in android emulator

My web application runs in localhost server. In my emulator the URL is http://localhost:8080/myaction Is it possible to retrieve the information from the server?
saravanan
  • 1,229
  • 6
  • 16
  • 17
61
votes
17 answers

Address already in use: JVM_Bind java

Some times whenever I restart the application, which is built on Java Struts Mysql and Jboss 4.05 Version I get the error as Address already in use: JVM_Bind Only fix that i know is to restart the machine and try again, it will work. Else Some…
gmhk
  • 15,598
  • 27
  • 89
  • 112
56
votes
2 answers

$null check in velocity

I came to know about null check using $null in velocity 1.6 through a resource updated by you. Resource: Reading model objects mapped in Velocity Templates But I am facing so many challenges that there is no $null for null check in velocity as there…
lucky
  • 561
  • 1
  • 4
  • 3
49
votes
4 answers

Java Component based vs Request based frameworks

I was recently asked in an interview - In java, how do you compare component based frameworks to request based frameworks? I explained EJB as an example of Component based framework and Struts as a request based framework but was not convinced if I…
user150014
  • 743
  • 2
  • 8
  • 9
48
votes
6 answers

Difference between Spring MVC and Struts MVC

What is the major difference between the Spring MVC and Struts MVC?
Krishna
  • 7,154
  • 16
  • 68
  • 80
46
votes
2 answers

How I hide empty Velocity variable names?

I am using Struts + Velocity in a Java application, but after I submit a form, the confirmation page (Velocity template) shows the variable names instead an empty label, like the Age in following example: Name: Fernando Age: {person.age} Sex:…
Fernando Barrocal
  • 12,584
  • 9
  • 44
  • 51
40
votes
15 answers

How can I set the welcome page to a struts action?

I have a struts-based webapp, and I would like the default "welcome" page to be an action. The only solutions I have found to this seem to be variations on making the welcome page a JSP that contains a redirect to the action. For example, in…
mrowe
  • 841
  • 1
  • 7
  • 6
37
votes
7 answers

Where are compiled JSP Java (*__jsp.java) files?

I am getting a javax.servlet.jsp.JspException in one of the jsp files that my website is trying to render (survey.jsp). However, the stack trace does not give me the the specific line in jsp where it fails but rather the line number where it fails…
Sam
  • 2,398
  • 4
  • 25
  • 37
31
votes
6 answers

How to get the original request url from a servlet/jsp after multiple servlet forwards

I am working on a cruise booking app using struts/tiles that uses multiple internal servlet/jsp forwards to reach the right jsp for display. But, once you reach the final jsp that is used to render the page, the ${pageContext.request.requestURL}…
Salman Paracha
  • 1,697
  • 2
  • 16
  • 27
29
votes
5 answers

How to find the Struts version being used in a project

How to find the Struts version being used in a Web Application project in Eclipse? My struts-config.xml says
Van de Graff
  • 5,043
  • 13
  • 39
  • 41
26
votes
2 answers

Getting a 'No thread-bound request found' error from spring in my web app

I'm getting a 'No thread-bound request found' error in my web app and hoping to get some help. I'm trying to use struts2 + spring + hibernate, and use spring to manage the hibernate session factory, and inject hibernate sessions into my struts…
Chris
  • 39,719
  • 45
  • 189
  • 235
24
votes
3 answers

Why use 'redirect=true' in struts 1.* forward?

I've been having some problems with ActionMessages created during execution of an action which didn't display, and I found out that my problems were due to my forwards having redirect=true in struts-config.xml. Since the default behavior is…
Raibaz
  • 9,280
  • 10
  • 44
  • 65
23
votes
3 answers

Exception Handling in a Java Web Application

I am developing a medium size Java Web Application with Struts as MVC framework and simple JDBC at Data Access Layer. I have been searching for exception handling best practices in such an application. I have found several articles, some of them…
craftsman
  • 15,133
  • 17
  • 70
  • 86
21
votes
1 answer

Cross-site request forgery prevention using struts token

I want to implement Cross-site request forgery prevention for my web application which is base on struts 1.x framework. I know that struts 2 framework provide token interceptor for this and I can implement similar functionality using filters. I am…
Niraj Sonawane
  • 10,225
  • 10
  • 75
  • 104
21
votes
3 answers

Are the docs for Struts 1 still available online?

I have needed to maintain a Struts 1 application. I know, EOL almost two years ago, no new releases in six years. Whatever, we have 100k lines of working code in a Struts 1 app, and it's not going away just because I have more modern…
Eric Wilson
  • 57,719
  • 77
  • 200
  • 270
1
2 3
99 100