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
5
votes
4 answers

How to use maxlength on textarea in struts 1 html tag

In struts 1 tags for html:textarea here I do not see a maxlength attribute. How can i restrict the user from entering more than 100 characters? Also why did struts 1 omit such a basic attribute?
Victor
  • 16,609
  • 71
  • 229
  • 409
5
votes
3 answers

What value is submitted by struts checkbox tag when checkbox is unselected

I ran into this scenario. class MyForm extends IdSelectionForm { private Boolean approveIt = true; ..... } my JSTL form consists of When I select checkbox and submit. In…
prakashpoudel
  • 565
  • 2
  • 9
  • 25
5
votes
2 answers

What is a best practice to pass data from Action to view(jsp) in Struts 1.3.?

I am writing web application in struts 1.3. I want to pass ArrayList of Employees to JSP page. I see following two approches : 1. Put List of Employee as a field into ActionForm. List employees; Action class setting this…
Nils
  • 806
  • 1
  • 9
  • 24
5
votes
2 answers

upload file error , -argument type mismatch-

In my jsp i have a html:file like this, and in the form i have the getter and setter. but when running i got Caused by: java.lang.IllegalArgumentException: Cannot invoke com.app.app.struts.forms.MyForm.setDocfile on bean class 'class…
Elye M.
  • 2,667
  • 4
  • 30
  • 43
5
votes
3 answers

Struts html tags are not working

I just tried to include a textbox in jsp page with struts provided tags. But it's behaving every typical. Working Not Working So, with out property 'value', its…
Ramis
  • 55
  • 1
  • 2
  • 9
5
votes
2 answers

How to use Tiles2 with Struts 1

Is it possible to use Tiles2 with Struts 1? I've followed the instruction available at the migration guide http://tiles.apache.org/migration/index.html But when I try to access my actions, I get this…
Daniel Cukier
  • 11,502
  • 15
  • 68
  • 123
4
votes
7 answers

Exception-" java.lang.NullPointerException: Module 'null' not found " in Java-Struts 1.3

While deplyoing Struts 1.3 Login application on localhost 8080 (Apache Tomcat 6.0.16 Server). I am getting following error. HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it…
suraj_fale
  • 978
  • 2
  • 21
  • 53
4
votes
4 answers

Displaying struts validations message

I want to display errors detected in an action class, I use: errors.add(ActionErrors.GLOBAL_MESSAGE, new ActionMessage("some_string_in_properties_file"));` and it works fine. However, I have written some generic error messages, and I would like…
jeevs
  • 261
  • 6
  • 20
4
votes
2 answers

Struts 1 : Put values of a jsp into form that uses a java List

In my jsp, I have some fields like this :
Marouane Gazanayi
  • 5,063
  • 6
  • 39
  • 58
4
votes
2 answers

Jquery Modal Forms with Struts 1.3

I'm builing a web application using Struts 1.3 for a class project, and I'm having some problems with the AJAX compatibility of Struts 1.x (I hear 2.x is way better with AJAX and jQuery). Thank you for the reply, this is the updated problem: I'm…
nicohvi
  • 2,270
  • 2
  • 28
  • 42
4
votes
5 answers

Handling session time-outs in Datatables (with server-side datasource processing)

I have a datatables form that's backed by a server-side Ajax data source (which uses a struts action in the backend to process the request, fetch the data and send a JSON response). The server-side operation needs to run in authenticated mode, i.e.…
Ashkan Aryan
  • 3,504
  • 4
  • 30
  • 44
4
votes
2 answers

javax.servlet.jsp.JspException: Cannot find bean: "departments" in any scope

JSP PAGE <%-- Document : DeptListing Created on : 20-Aug-2011, 10:12:36 Author : LenasalonM01 --%> <%@page contentType="text/html" pageEncoding="UTF-8"%>
mykey
  • 575
  • 2
  • 10
  • 24
4
votes
3 answers

How to include multiple message resources in Struts?

I'm using (learning...) Struts 1.3 to build an MVC web application. For clarity, I'd like to include more than one element - separating the messages into files for specific modules of the application. The official Apache…
Michael
  • 7,348
  • 10
  • 49
  • 86
4
votes
2 answers

Include javascript file from inside WEB-INF

I am developing a website in struts. My folder structure is as follows : Now, I have a jsp page register.jsp, in which I want to add jquery.validate.js file. I have followed suggestion from the following link : Can not include javascript file from…
Rumel
  • 319
  • 1
  • 3
  • 19