• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Context Path Issue in Struts

 
Sreekanth Kalakanti
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am working on Struts application, we are having application resources files(app.xml) file in resources folder of My Struts application, so i need to read this file

we are able to get the reader Object here in local System Jboss Server but in Main Server its not working i even tried



but the context path i am getting is http:/100.100.20.14:8080/abc/resources/app.xml i.e after http i am getting only one / i.e(http:/) so can any one can guide me in right path


Regards,
Sreekanth
 
Shinelin Samuel
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sreekanth,

Any reason to use http url (with hostname and port)?, I believe you can directly load your property file using the directory path in your Server host (i.e if it is unix host it will be something like this -> /root dir/<appDeploymentpath>/resources/app.xml )
 
Mark E Hansen
Ranch Hand
Posts: 650
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look into the getResourceAsStream method of the ServletContext object.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic