Questions tagged [struts-config]

Use this question for struts-config related questions.

The struts-config.xml configuration file is a link between the View and Model components in the Web Client. It plays an important role in building both Controller components and Application-specific configurations.

This file is created to every application in the format as <module>-struts-config.xml, where can be topo, fault, perf and so on. For example, a struts-config.xml file of the fault module is represented as fault-struts-config.xml and is present in /webclient/fault/conf directory.

Attribution : http://www.webnms.com/webnms/help/developer_guide/web_client/web_struts_config.html

171 questions
22
votes
5 answers

struts action mapping action input attribute

I am a noob when it comes to Java and Struts ( I feel like .Net boy in Java world ). What is the input attribute on the action element used for? So in the example below the input is someinput.jsp.
rabs
  • 1,807
  • 3
  • 18
  • 29
15
votes
4 answers

org.xml.sax.SAXParseException: Document is invalid: no grammar found.

I'm getting the errors in my Struts application, on my development machine, saying apparently my config files have errors (which I already checked and seem ok): org.apache.commons.digester.Digester error SEVERE: Parse Error at line 3 column 15:…
Rui
  • 5,900
  • 10
  • 38
  • 56
14
votes
3 answers

Basic flow of Struts

Well I want to study Struts so I am going to begin with Struts 1, I would like to know the general flow. What files are required? Whats the function of struts-config.xml? validation.xml? validation-rules.xml When you visit your JSP page, and an…
user478636
  • 3,304
  • 15
  • 49
  • 76
10
votes
1 answer

Struts2 .action extension causing CSS, JavaScript and Struts Dojo to break

We have been running on Struts 2.1.8 for some time and all Struts actions have been working as expected, i.e. href's to the Struts actions are rendered with the action name with no extension. Here is the JSP code that set's up the links:
Greg Kennedy
  • 805
  • 1
  • 11
  • 23
8
votes
1 answer

Struts struts-config.xml action-mapping explained

I am a noob to Struts framework. I am trying to understand how action-mapping works exactly. Suppose I have a JavaScript file that sends an AJAX request: $("button").click(function(){ $.ajax({url: "myTestUrl.do", success: function(result){ …
Tom O.
  • 5,730
  • 2
  • 21
  • 35
8
votes
2 answers

Struts 2 Download - How to configure the file name dynamically?

I am developing one application , where people will download the required file from a location mentioned in the DB to their Local. I am using struts 2 for downloading the file from the server . I can download the file without any exception and it…
Esh
  • 836
  • 5
  • 16
  • 43
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

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

is this struts 1.x form bean in session scope or request scope?

I have been searching for a concrete answer for this, as much of google returns a lot of very old posts. Is this greetingActionForm in the request scope, or in the session scope? Is there any location besides the action and form-bean declaration to…
DefyGravity
  • 5,681
  • 5
  • 32
  • 47
4
votes
3 answers

org.apache.struts.action.ActionMessage cannot be cast to org.apache.struts.action.ActionError

I am working on struts1.2 application. I created a formbean extending validatorform, then override the method validate(). then when I am running the flow. its giving me the error . Aug 21, 2011 8:42:07 PM…
Pedantic
  • 1,368
  • 10
  • 39
  • 70
4
votes
4 answers

The content of element type “struts-config” must match “(datasource?,form-beans?

I wrote a small struts application with a login page and registration page. If I login I get a success page. If i register, i will check the password and confirm password fileds if they match i get a success page else failure page. I did not use…
priya
  • 4,287
  • 7
  • 22
  • 15
3
votes
1 answer

Internal Server error while calling an Java method from JSP

This is my JSP extra.jsp: <%@taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>

this formBean HelloWorldForm.java: package…
Sanket
  • 33
  • 5
3
votes
1 answer

Disable Struts action invocation

Is there a way to configure whether a struts action can be invoked? For example, I have the following class: public class MyAction { public String myMethod() { // logic } } and the struts.xml file:
ahmehri
  • 756
  • 2
  • 8
  • 26
3
votes
1 answer

load and read property file from struts.xml

I am creating a project using Struts2. I am setting the global-results tag in struts.xml in the following way: https://www.example.com I want to know if I can read…
pal sarkar
  • 105
  • 1
  • 9
3
votes
1 answer

Changing struts.xml file name for a multi-module Maven web project

I have a Maven project with multiple modules. Out of four modules, two of them are web modules. Here is the structure. MyProject | |__ api | |__ commons | |__ web_child | |__ web_main web_main module is the main one and it…
Coder
  • 6,948
  • 13
  • 56
  • 86
1
2 3
11 12