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

Check radio button default in struts html tag

How to set radio button checked by default in struts html tag ?
siva
  • 165
  • 1
  • 4
  • 11
6
votes
4 answers

Restrict HTTP requests to 'POST' only in Struts 1.x

Is there a configurable way in Struts 1.x so my action classses are only executed on HTTP 'POST' only. I understand I can use request.getMethod() within my action class and then do certain 'stuff' based on that. Regards, Jonathan
Jonathan
  • 191
  • 2
  • 3
  • 8
6
votes
4 answers

Supplying credentials safely to a RESTFUL API

I've created a RESTful server app that sits and services requests at useful URLs such as www.site.com/get/someinfo. It's built in Spring. However, these accesses are password protected. I'm now building a client app that will connect to this RESTful…
mtrc
  • 1,317
  • 3
  • 16
  • 39
6
votes
5 answers

Java Runtime.exec() asynchronous output

I'd like to get the output from a long running shell command as it is available instead of waiting for the command to complete. My code is run in a new thread Process proc = Runtime.getRuntime().exec("/opt/bin/longRunning"); InputStream in =…
wmarbut
  • 4,595
  • 7
  • 42
  • 72
6
votes
4 answers

Java (maven web app), getting full file path for file in resources folder?

I'm working with a project that is setup using the standard Maven directory structure so I have a folder called "resources" and within this I have made a folder called "fonts" and then put a file in it. I need to pass in the full String file path…
Rick
  • 16,612
  • 34
  • 110
  • 163
6
votes
1 answer

Duplicate class definition error

Can anyone help resolve this? 15:02:06,698 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception java.lang.LinkageError: loader (instance of org/apache/jasper/servlet/JasperLoader): attempted duplicate class definition for name:…
Mark W
  • 5,824
  • 15
  • 59
  • 97
6
votes
1 answer

java.lang.ClassNotFoundException: javax.servlet.jsp.SkipPageException

When i run the jsp page i am getting the following error. Web sever : Tomcat 6.0 , using Struts java.lang.ClassNotFoundException: javax.servlet.jsp.SkipPageException at…
Rams
  • 61
  • 1
  • 3
6
votes
2 answers

Set default value of select using java in Struts 1.x

I've come across answers for Struts 2.x but none for struts 1.x. All I need to do is select a default value on page load using 1.x of an HTML:SELECT tag that uses an optioncollector:
Organiccat
  • 5,633
  • 17
  • 57
  • 104
6
votes
4 answers

How to integrate an old Struts application with Spring 3.x

i was wondering how to and what the prefered way of integrating an Struts 1.x application with Spring 3.x so we can benefit from the IOC stuff.
Marco
  • 15,101
  • 33
  • 107
  • 174
6
votes
1 answer

Liferay with Struts , JSP

I have web application developed using JSP and struts. I am just looking out for options to have different look and feel , and Ajax rendering . Liferay was suggested by one of my team mate. But I am not able to get much details on it. How do i make…
priya
  • 950
  • 1
  • 10
  • 15
6
votes
4 answers

How to escape curly brackets in .properties file in Struts 1.2

I have a requirement to retain the curly brackets from properties file in my rendered JSP code. Is it possible? I have tried options like: \{, '{, {{, '{', /{, but no help. At runtime, I get an exception: java.lang.IllegalArgumentException:…
Nishant
  • 61
  • 1
  • 3
6
votes
1 answer

Spring security tags in sitemesh decorator

I want to use a few tags of the spring security tag library inside the decorator file of site-mesh. However content inside these tags is never shown. Can anyone tell me why this is? Code:
Mark Baijens
  • 13,028
  • 11
  • 47
  • 73
6
votes
1 answer

Spring framework replacement for FlowAction

I recently inherited a very old code base (written in 2006) that uses the spring framework. Right now, the goal is to get it semi-functional, which I've almost done. However, there is some code I can't seem to fix that uses the class "FlowAction"…
blh83
  • 495
  • 5
  • 17
6
votes
1 answer

How to decide on what framework to use in Java Web Service?(SOAP)

I am fairly new in Java EE web service. Right now we have a project to create an API web service that connects to a database and do some retrieve and write functions. I've heard about the following: Axis Struts Spring Can someone please enlighten…
Deus Levin
  • 193
  • 2
  • 13
6
votes
3 answers

read the contents of a file upload in java

I know how to upload a file: File Uploading Form
File :
coder
  • 149
  • 3
  • 4
  • 17