Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
sharp shooter, and author
Posts: 1913
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moving to the frameworks forum...
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
The overall mission is to change the world. When you've done that, then you can read this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/t/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic