Questions tagged [struts-1]

The Apache Struts web framework is a free open-source solution for creating Java web applications. The Struts framework is designed to help developers create web applications that utilize a MVC architecture.

The Apache Struts web framework is a free open-source solution for creating Java web applications. The Struts framework is designed to help developers create web applications that utilize a MVC architecture. Struts 1.x has reached End Of Life status as of 2013-04-05 (see announcement).

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 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.

1232 questions
2
votes
1 answer

logic:present not working as expected

I've condensed the code to its barest essentials to illustrate my problem as clearly as I can. I hope the formatting turns out ok - this is my first post with stackoverflow and no matter what I did, indent 4 spaces or use ctrl-K, the compiler was…
mattlove
  • 25
  • 1
  • 5
2
votes
1 answer

When is 'mapping.getInputForward()' used?

I would like to know what mapping.getInputForward() does in Struts. The API says that it creates and returns an ActionForward that corresponds to the input of the Action. But I don't understand what this means. Could anybody explain to me more…
Ifozest
  • 900
  • 2
  • 12
  • 22
2
votes
1 answer

Response filtes in struts 1

We are using struts 1.2.4 in our application. The application currently allows caching of secure(https) pages (cache-control is not enforced). I want to change that behaviour and add cache-control:no-cache to all the responses. Does struts provide…
Anirudhan J
  • 2,072
  • 6
  • 27
  • 45
2
votes
1 answer

how to solve ClassNotFoundExceptions : org.apache.commons.beanutils.Converter

After deploying a web application i am getting the below error : java.lang.ClassNotFoundException: org.apache.commons.beanutils.Converter I am using Apache Tomcat 5.5 and Struts 1.3.8 I have copied the required jars but still facing this problem.i…
omkar sohani
  • 147
  • 3
  • 6
  • 17
2
votes
1 answer

How many instances of an Action class are created in Struts 1.x

I was searching to know the number of instances created per Action class in Struts 1.x, then I found that it is a Singleton. But I have a doubt: In the action mapping section of struts-config.xml we define the action tag, where there is a scope…
Amrin
  • 1,495
  • 6
  • 14
  • 14
2
votes
1 answer

inside

I have an itemList and for each item, a dropdown list of ratings is displayed. After user rates each item in itemList, i want to store those rates in an array. How can I do it? selectedRate below is of Integer type, and the code failed to solve the…
TPT Gin
  • 35
  • 1
  • 1
  • 7
2
votes
1 answer

HTML form with multiple input fields

I have a html form which is populated using a java for loop. And it contains multiple input text type fields (email addresses) filled with the values which comes in a java arrayList from database. User can change the email addresses. The task at…
HashimR
  • 3,803
  • 8
  • 32
  • 49
2
votes
1 answer

How to do URL redirect in Struts 1?

Our application (still using Struts 1) needs to redirect the user to a new login page (hosted externally). In a similar application (using Struts 2), we have this working properly. Below, I will show our implementation. Ultimately I want to find the…
JCP
  • 169
  • 1
  • 7
2
votes
2 answers

POST getting converted to GET across OS

I'm facing a very weird kind of problem while running my application. When I hit a website and login to my application, the POST is getting converted to GET automatically. Since all the request parameters are getting lost due to this, the page…
2
votes
1 answer

Struts (Java), changing forward name for an action that takes input parameter=page doesn't let me access that page at new name

I'm still fairly new to Struts (for a legacy project for current employer), in this case I am using Struts 1 so not sure if that matters. I am trying to edit an action that has a bunch of forwards but for simplicity I have just included one. This…
Rick
  • 16,612
  • 34
  • 110
  • 163
2
votes
1 answer

Java struts get property from index

I have been tasked with improving the form validation on a page. The site uses .jsp/bean/struts etc. Currently there is a loop at the top of the page to print errors to the screen:
Gary
  • 747
  • 3
  • 10
  • 24
2
votes
1 answer

Struts redirect with params

I'm using struts 1.2.4 but I have a need to redirect with parameters from an Action Servlet to a target page. I'm not able to upgrade to 1.2.7+ struts, so I'm not able to take advantage of ActionRedirect. Right now the save() method in my action…
user619804
  • 2,286
  • 12
  • 46
  • 71
2
votes
0 answers

How can we use Struts-1 and Spring-Boot together in an application?

I'm working in an old web application which is using Struts-1 with Hibernate. There we're using full-fledged functionality of struts1 with ActionServlet as the front controller, struts-config.xml as configuration file etc. We are using tomcat-9 for…
Jerry
  • 281
  • 4
  • 21
2
votes
1 answer

How to extend unavailable Locale.Language by default in action controller?

So I am trying to implement a Struts 1 I18N application with some languages that are not supported by default (Swedish, Portuguese, Spanish etc.) But when I define Locale.Portuguese in action controller for example, it would shows me PORTUGUESE…
not_Prince
  • 320
  • 3
  • 17
2
votes
2 answers

Give me an Example with reason for why we are use Struts?

I want to start learning Apache Struts 2. Please explain the benefits of using a web framework such as Struts 2. Also what are the differences between Struts 1 and Struts 2?
user529429