This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Struts and the fly likes spliting struts-config.xml error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "spliting struts-config.xml error" Watch "spliting struts-config.xml error" New topic

spliting struts-config.xml error

Bruno Frascino
Ranch Hand

Joined: Jul 22, 2003
Posts: 55
Hi everybody,

I'm trying to separate my struts-config.xml in more files, but I got an error:

19:32:54,546 ERROR [ActionServlet] Parsing error processing resource path /WEB-INF/struts-config.xml,
at org.apache.struts.action.ActionServlet.initApplicationConfig(
at org.apache.struts.action.ActionServlet.init(

Here is my web.xml code where I define my other .xml(struts-estatistica.xml):

Here is my struts-estatistica.xml:

Anybody can help me?! What Am I forgetting to do?
Does have anything to be done at the original struts-config.xml??

Thanks in advance!

Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
You cannot define two different configuration files for a single module. If you want to define more than one configuration file, you must also define more than one module. My suggestion would be to define a separate module named "estatistica". The entries in your web.xml file would look like this:

Then, if you wanted to call an action defined in struts-estatistica.xml, you would have to prepend "/estatistica" to the action call, for example:

Consultant, Sima Solutions
Bruno Frascino
Ranch Hand

Joined: Jul 22, 2003
Posts: 55
Thanks Merrill,

Now it is working... but I'm confused, cause I've got an example of web.xml like this:

and it's working properly... but when I tried to do it, I failed.
That's ok, for now, most important thing is make this application work, but when get spare time I'll check this issue again.

Thanks mate!!
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
I stand corrected. Upon reviewing the documentation, it is supposed to be possible to specify more than one config file for a single module.

I don't know why it's not working in your particulat case, though.
Consider Paul's rocket mass heater.
subject: spliting struts-config.xml error
Similar Threads
Error: creating bean of class (HELP THE NEWBE)
first struts application error
Servlet action is currently unavailable
Combining two different struts modules of a big application
help with module level struts config