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
1
vote
1 answer

Dynamically modifying tiles in Struts

I'm trying to modify how my pages look like, based on which module is currently active. So basically, I have one common set of jsp pages, that need to have tiles changed based on the module. I am able to implement basic tiles independently with each…
Urban
  • 2,201
  • 24
  • 52
1
vote
1 answer

Maven install build error - Path to Dependency

I have gone to my directory where the project folders and files are and executed a mvn clean and mvn install and yet i get this: [INFO] Unable to find resource ‘org.eclipse.core:org.eclipse.core.commands:pom:3.5.0.I20090525-2000’ in repository…
bouncingHippo
  • 5,940
  • 21
  • 67
  • 107
1
vote
2 answers

what does the default struts handler for DELETE do

Struts seems to have a default handler doDelete for the DELETE HTTP method. The servlets I have implemented does not use any DELETE method. However, the DELETE method does show up when I perform a method query using curl. I'd like to know the…
user277465
1
vote
3 answers

How to check the existence of a session in a jsp page

I am building a web app and i need to check whether a session exists. I want to check that in a jsp page. I have created my session in an action class(Struts 2 framework). I don't want to use script-lets. Is there any way to do this using EL or…
Rebooting
  • 2,762
  • 11
  • 47
  • 70
1
vote
1 answer

org.apache.struts.chain.commands.servlet.CreateAction createAction INFO: Initialize action of type:

I am having a problem with my struts application, where user is asked to update his details with form action as userUpdateAction and form bean is UserUpdateForm.I have servlet filter to check whether the user is already logged in or not. If he didnt…
1
vote
2 answers

Increasing the font size of a button

I have an application made in struts 1.2 and it will be accessed by Desktop browser as well as Android browser. The layout of the DEsktop browser is fine but having problems with the layout in Android browser. Somehow I managed to do the UI look and…
user182944
  • 7,897
  • 33
  • 108
  • 174
1
vote
3 answers

How to know from which class a request has been received

I have a login.jsp page in my application. I am using Struts 2 and a simple validate() method to validate my form. I have two questions: validate() method in my form bean class validates the form. I.e checks for empty fields etc. If I need to check…
Rebooting
  • 2,762
  • 11
  • 47
  • 70
1
vote
0 answers

remove msg from ActionMessage

How do I remove a particular error message from ActionMessage. For example, below msgKey is "ABC" and msg.getKey() is "ABC". Now when both are same I want to remove the key from the ActionMessage. How do i do it? Iterator it =…
Geek
  • 3,187
  • 15
  • 70
  • 115
1
vote
1 answer

Unused files in Apache Struts project

I have recently inherited a project at work written using Apache Struts and its a bit of a mess, with quite a few unused files like jsp, java, css. Is there an easy way of identifying unused files without having to manually check? It is a very large…
1
vote
1 answer

Downloading images in a jsp: Illegalstateexception: getwriter() has already been called for this response

First of all, sorry if this question has already been asked, I have seen a lot of similar questions but none of them provide me an useful answer. I'm using Struts and I want to download an image into a img tag. I use this in other places of my…
1
vote
1 answer

Struts 1.2 intRange Validation getting failed

Password validation is getting failed for intRange. The validations are done using the Validator framework. The required validation for password is working fine and displaying the message properly. But the intRange validation is getting failed. Even…
user182944
  • 7,897
  • 33
  • 108
  • 174
1
vote
4 answers

Struts 2 Select tag

I'm pretty new to the jsp and struts way of doing things and so far I like what I see. My current question is with the use of the struts select tag. I have a page that displays a number of dropdown boxes using struts select currently the options are…
nathj07
  • 101
  • 2
  • 5
1
vote
1 answer

How do I prevent STRUTS from persisting selections?

I am using JAVA STRUTS. I have an html form with an ActionForm class associated with it and the controls are created using tags. As I understand it, STRUTS will persist selections on an html form even if the form is refreshed. I need to prevent…
jrizzo
  • 1,652
  • 4
  • 17
  • 29
1
vote
2 answers

Struts 2: user 1 logs in and gets data of the user who logged in just before from another macine

I am having an issue with a struts 2 application. User 1 logs in successfully and is redirected to some page. After that , User 2 tries to login from her machine, she get redirected to user1's landing page. I am not sure if that is an issue with the…
Rpant
  • 974
  • 2
  • 14
  • 37
1
vote
0 answers

Dynamic/generic/custom forms in Java web app

In our manufacturing process, we have many different forms out there that the workers have to fill out. We're trying to automate them. Instead of me coding up each form, I'd like to have it so that the workers define all of these forms and then we…
Gary Kephart
  • 4,860
  • 5
  • 39
  • 52