This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Struts and the fly likes unable to locate /WEB-INF/struts-config.xml   (Struts on WAS3.5. 2) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "unable to locate /WEB-INF/struts-config.xml   (Struts on WAS3.5. 2)" Watch "unable to locate /WEB-INF/struts-config.xml   (Struts on WAS3.5. 2)" New topic
Author

unable to locate /WEB-INF/struts-config.xml (Struts on WAS3.5. 2)

mars76
Ranch Hand

Joined: Nov 30, 2000
Posts: 30
Hi All,
We are using Struts on WAS3.5.2 and when we try to host a sample struts
application we are getting the following Error.
unable to locate /WEB-INF/struts-config.xml
The Directory Structure of the Web Application is as follows :
Document Root : $WAS_HOME/default_host/struts-example/web
Class Path : $WAS_HOME/default_host/struts-example/servlets
- struts-example
- web
-WEB-INF
- servlets
-WEB-INF
I have copied the WEB-INF folder into web and as well to servlets
directory.
the struts-config.xml file is residing in the WEB-INF directory .
Pls let me know how to resolve this..
Thanks in Advance
Sateesh
Simon Brown
sharp shooter, and author
Ranch Hand

Joined: May 10, 2000
Posts: 1913
    
    6
Moving to the frameworks forum...
Vineet Sharma
Greenhorn

Joined: Jan 08, 2003
Posts: 2
There are two ways of going about this:
1) register the struts-example.war file with WAS.
This way you dont have to worry about creating the WAS specific structure (web & servlet directories), however, this will be a pain during development, considering that u'll have to rebuild the jar after every small change to the application.
2) Another way of going about it is to change the reference location in web.xml. The Action Servlet definition contains a piece of xml code like
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
Change the value here and it should work fine.
Cheers,
Vineet.
 
Consider Paul's rocket mass heater.
 
subject: unable to locate /WEB-INF/struts-config.xml (Struts on WAS3.5. 2)