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

how to map multiple url for one servlet

i am mapping two url with one servlet in my struts web application, the part of code in web.xml is bellow. action org.apache.struts.action.ActionServlet
sharad7188
  • 85
  • 5
3
votes
2 answers

what is the differance path type in java struts.xml?

I am new java struts framework. But I want to ask a question. In struts.xml path is .do like "/AddReq.do" OR path is only name like "AddReq" What is difference between "/AddReq.do" and "AddReq" ? For example
Serdar Alkan
  • 181
  • 1
  • 4
  • 15
3
votes
1 answer

Meaning of method attribute in struts action tag

What is the attribute method in the action tag in the struts.xml? I have seen a lot of usage cases of this attribute but I don't understand how it changes the behaviour? For example I see nothing happens when I change the following method attribute…
Johnny
  • 1,509
  • 5
  • 25
  • 38
3
votes
3 answers

Make a struts action do nothing

Is there a way to make a struts action do nothing? I don't want to do anything after my action is performed. Every single action in the project I inherited (794 of them) are redirectAction. But I don't want to redirect. I just want to stay on the…
corsiKa
  • 81,495
  • 25
  • 153
  • 204
3
votes
1 answer

When would a bean tag be used in Struts 2 configuration file?

When would be the bean tag used in struts.xml configuration file using Struts 2? What is difference between action class properties and bean tag in Struts 2 configuration file struts.xml?
user1357722
  • 7,088
  • 13
  • 34
  • 43
2
votes
3 answers

Problems getting Tiles work with Struts2

I'm using struts 2.2.1 and tiles 2.2.2. I've done every step described here but I cannot get tiles work... I get the following error while deploying my war to glassfish…
strauberry
  • 4,189
  • 5
  • 34
  • 50
2
votes
0 answers

Missing configuration resources in StrutsTestCase 2.1.4

I'm trying to use StrutsTestCase 2.1.4 to do unit testing on my Struts application. But when I tried to run the test, a "missing configuration resources for path /WEB-INF/web.xml" error happens. I looked it up in the FAQ of StrutsTestCase, and…
lastland
  • 890
  • 3
  • 14
  • 28
2
votes
1 answer

Can you use regular expressions in struts-config.xml?

I'm trying to route these two url's to different Actions. We are using Struts 1.2: /abc-def/products /abc-def I tried putting this action first:
Ryan Quinn
  • 1,175
  • 1
  • 15
  • 28
2
votes
1 answer

Struts JSP page does not display correctly, it shows the unparsed source code in browser

I use Tomcat 8 and Struts 1.3.10 when i execute my application http://127.0.0.1:8080/appli/welcome.jsp i have this in my browser <%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %> <%@ taglib…
Mercer
  • 9,736
  • 30
  • 105
  • 170
2
votes
1 answer

How to include one struts jsp in another when both jsps have ?

I have 2 jsps - jsp1 and jsp2. Each jsp has a defined. jsp1 ...... jsp2
user811433
  • 3,999
  • 13
  • 53
  • 76
2
votes
1 answer

Why the Exception raised from my Interceptor is not caught by ?

I have a custom Interceptor, from which I throw an Exception; The Action(s) running that Interceptor is managed by Convention plugin; The Exception raised by the Interceptor is globally defined in struts.xml for the package the Action is running…
2
votes
2 answers

Struts 2 s:include tag not working for header jspf file

I have index.jsp which contains header.jspf,main content and footer jspf. I am using s include to include header and footer jspf. My header jspf contains surl tags with param values in it. I have included s tagslib in it. My index.jsp/header.jspf…
Kiran Badi
  • 501
  • 2
  • 9
  • 24
2
votes
2 answers

Struts cannot access jsp from jsp directory

I have a Struts2 application initially the jsp pages were at the root of the WebContent directory however it was decided to add a jsp directory to hold the jsp pages. Since this has been done the pages are not accessible and resulted in HTTP 404…
devdar
  • 5,564
  • 28
  • 100
  • 153
2
votes
1 answer

Not getting form data in the Action

I am new to struts 2 ,what i am doing is to create a form in struts 2 and show the entered value on other page.but when i submit the values on the step1.jsp page it is not showing on the profileuplaoded.jsp Here are my jsp page on which i am…
user251287
  • 101
  • 1
  • 3
  • 12
2
votes
2 answers

How to define a global page when requested page or method is not found?

I know how to fine a global error redirect page in our defined package when exception encountered that just by adding the following configuration in the parent package in struts.xml:
Brady Zhu
  • 1,305
  • 5
  • 21
  • 43
1
2
3
11 12