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

not all named parameters have been set hibernate in createSQLQuery

I am getting the error of not all named parameters have been set. Below is my code. my SqlQuery which is running fine at mysql prompt, You can refer schema in the question SQL Query SELECT t.* FROM ( SELECT @lim := 2, @cg := '' …
mahesh
  • 4,625
  • 11
  • 42
  • 61
8
votes
4 answers

AJAX file upload/form submit without jquery or iframes?

Is it possible to do an AJAX form submit without jQuery or IFrames (so just pure JavaScript)? I'm currently sending to a struts fileUploadAction that works. Would the action's code still work with the asynchronous submit, or are there additions…
edwardmlyte
  • 15,937
  • 23
  • 58
  • 83
7
votes
3 answers

struts tutorial or example

I'm trying to make a login page in Struts. The idea is to validate if the user exists, etc, and then if there is an error, return to the login page with the errors in red (the typical login or any form page validation). I would like to know if…
Tere
  • 245
  • 1
  • 3
  • 14
7
votes
2 answers

How to upload multiple files in Struts 1

How do I upload multiple files in Struts 1's ActionForm? I have to show multiple options of file uploading and save them at time. I don't want to show input box for file in Struts 1?
user1172963
  • 71
  • 1
  • 3
7
votes
1 answer

struts-config.xml file - purpose of input

I am new to struts. I am wondering what input variable here signifies. After some googling, the only conclusive piece of info was this: Input: The physical page (or another ActionMapping) to which control should be forwarded when validation errors…
well actually
  • 11,810
  • 19
  • 52
  • 70
7
votes
1 answer

Struts: HTML Option Selected?

In struts, it seems there is no "selected" option. The HTML option tag has a selected attribute such that you can do: and that option will be automatically selected. Is there a way to do this in…
well actually
  • 11,810
  • 19
  • 52
  • 70
7
votes
1 answer

how many values available for scope attribute in action element of struts-config.xml file

How many values available for "scope" attribute in "action" element of struts-config.xml file other than "request" and "session"?
Manu
  • 3,179
  • 23
  • 57
  • 69
7
votes
2 answers

How can I test if a given request parameter is present using Struts tags?

Some pages can receive a certain request parameter called "P1": page.do?P1=value1 Right now a scriptlet is testing the existence of the request parameter, and if P1 is "value1" some information is rendered on the page . Instead of using a scriptlet…
Andrei Ciobanu
  • 12,500
  • 24
  • 85
  • 118
7
votes
3 answers

what is the NDC logs and how we can use it in our application and what is the significance of that

what is the NDC logs and how we can use it in our application and what is the significance of that...
Pedantic
  • 1,368
  • 10
  • 39
  • 70
7
votes
2 answers

Java web application Front end

I have a large application that is using Java on the backend and struts, Jsp and JSTL tag library on the front end. Database is DB2 and we rely heavily on Stored procedures. We are planning to upgrade the application to a new…
daoud175
  • 211
  • 1
  • 4
  • 9
7
votes
1 answer

How to use AngularJS with Struts 1.x

I'm new to AngularJS and client side stuff and I'm adding a new page to an old application that uses Struts 1.3 as its framework. I would like to use AngularJS for the front end. I know how to return JSON from the action class by writing the JSON…
sef9110
  • 153
  • 2
  • 10
7
votes
1 answer

Flow of control in Struts 1.2 (Lifecycle)

Title may sound a little vague but I'll give it a go. I have 2 servlets: one.java: Extends the Action class forwards the page to success or failure based on the inputs at index.jsp two.java: Extends the ActionForm class, Has getters and setters…
Punjan Sudhar
  • 221
  • 1
  • 2
  • 8
7
votes
2 answers

Adding interceptors in struts.xml for all Action classes

I've used the Struts 2 framework and I have created a web application which has a Login Page. I have three different Action classes named Action1, Action2, Action3, and different views for JSP pages which are rendered by running some business logic…
Java Beginner
  • 1,635
  • 11
  • 29
  • 51
7
votes
9 answers

Controller in Struts

What is Controller in MVC ? Is it struts.xml or Servlet (Action Class)? Can we have more than one Controller in our application? Is it good practice to have more than one controller?
ajay
  • 81
  • 1
  • 2
  • 3
7
votes
2 answers

What does the scope attribute from the action tag of the struts-config file mean?

I'm working on a Struts application. In order to edit the struts-config.xml file, I think I have to add an attribute - scope, in the action tag. I'm not sure about its meaning, or its usage.
marlieg
  • 449
  • 2
  • 5
  • 16