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

Struts 1 - Tiles put boolean attribute

Is possible to put a primitive type, like a boolean as attribute? pageContext.setAttribute("boolValue", boolValue); and then in the other Jsp I use:
Vargan
  • 1,277
  • 1
  • 11
  • 35
1
vote
2 answers

Error while navigating between pages using struts display tag

I am getting the following error when moving between pages of the display tag: Request [/seatreportsubmit] does not contain handler parameter named 'method'. This may be caused by whitespace in the label text. However when I click the search…
ashwinsakthi
  • 1,856
  • 4
  • 27
  • 56
1
vote
5 answers

There is no Action mapped for namespace / and action name tutorial

I am unable to execute my struts2 application. I am using eclipse indigo IDE, tomcat 7 and jdk 1.7. The jar files I included are: commons-logging-1.0.4.jar, freemarker-2.3.8.jar, ognl- 2.6.11.jar, struts2-core-2.0.11.jar, xwork-2.0.4.jar I…
user1066912
  • 11
  • 1
  • 3
1
vote
1 answer

Struts2 xml-validation calling a method

Is it possible for an xxx-validation.xml to call a method? since my plan is that I would check a certain a value that it have received from the form and pass it as a parameter in a method (checks if the username exist in the db) or ActionSupport…
user962206
  • 15,637
  • 61
  • 177
  • 270
1
vote
0 answers

Is it possible to use spring message tags in a non-Spring-MVC application?

I have a Struts2 application in which I am currently using Spring Security and Spring DI, but my MVC framework is Struts2. I was wondering whether I can use spring form tags in the JSP. My basic requirement is to use Spring internationalization…
Daud
  • 7,429
  • 18
  • 68
  • 115
1
vote
2 answers

How to use struts tag in javascript

I'm trying to get value from Action using Ajax request, but I'm having problem in using struts tag in javascript to show the value. Javascript code: dojo.xhrPost({ url: "dashboard" ,content: myParameterscomp ,…
Stardust
  • 1,115
  • 6
  • 22
  • 33
1
vote
1 answer

how to display 4 buttons in a jsp page with restrictive access?

I want to display 4 buttons in a JSp page(BOMDisplay.jsp) in a restrictive manner. Means, there is another page(RoleTransaction page) where we have to select the category(dropdown) and role(dropdown) and there are various checkboxes that are meant…
1
vote
1 answer

How to encode a parameter with a url in struts?

A list of books is displayed on the page. When a user clicks a book, its detail page is opened. Now the problem is that I need to encode each book's id with the detail page url. The link to detail page is /loadDetailForm.do. If a book has id=23, the…
craftsman
  • 15,133
  • 17
  • 70
  • 86
1
vote
2 answers

JSTL in Struts tag

I have to check a condition in struts tag and enable or disable the field as follows:
Geek
  • 3,187
  • 15
  • 70
  • 115
1
vote
1 answer

get bean in struts

I am new to struts and I saw below code in my current project is USER in name="USER" a bean object? above code means USER.isReadOnlyRole right? I want to implement a OR condition…
Sandeep Kumar
  • 13,799
  • 21
  • 74
  • 110
1
vote
1 answer

HTTP Status 500 - No action instance for path in Struts1

It's my first time to use Struts and I build a very simple program But I always got this error :( I've googled it for 2 days but my type is correct for sure. Here are my codes: web.xml
Kooper
  • 715
  • 1
  • 10
  • 13
1
vote
1 answer

Prevent XSS attempts on a Tomcat/Struts 1 web application (without source code)

A 3rd party web application has a cross-scripting security issue. There is one page with three fields which are not sanitized. The vendor will not provide a timely fix and I need to. The application is running in Tomcat and uses Struts 1. The…
Jeremy Stein
  • 19,171
  • 16
  • 68
  • 83
1
vote
2 answers

locate type in struts-config.xml

here is my struts-config.xml
bouncingHippo
  • 5,940
  • 21
  • 67
  • 107
1
vote
1 answer

pass parameters

I want to pass a single parameter with holds a username through a tag. In the corrosponding action class I'm retreiving the parameter with request.getParameter() function, but I'm getting the value as null. here's my code <% String…
Aniket Kibe
  • 41
  • 1
  • 2
1
vote
1 answer

How to Overcome the JFreeChart Issue?

I'm using the Jfree chart in my struts application. Y-Axis is Over Shipment Pieces and X-Axis is Supplier Code and secondary axis is used for the Over Shipment %. What the problem i faced here is , If the Over Shipment % values all comes to Zero it…