This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

where to put war

 
Michelle Lee
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi:
Is any body know where shall I put war files? in
webapps? In my war file jsdg-webapps there is a file:
WEB-INF\classes\com\omh\webapps\WebAppProperties. I put jsdg-webapps.war in \tomcat-home\webapps, and then call:
http://localhost:8080/jsdg-webapps/servlet/com.ohm.webapps.WebAppProperties, but a 404 error showed. I try a few other place, it doesn't work too. Even I unzip the war file to fold jsdg-webapps, it is same result too.

Thank you for your help!
 
Sita Kodali
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A war (Web archive) file normally is to be placed in <serverroot>/webapps folder. If your server root is /var/www/tomcat, then webapps should be placed in /var/www/tomcat/webapps.
Upon restarting, server will extract war file and creates a dynamic context associated with the war.
You may access newly created context as http://yourservername:yourport/your_war_file
HTH
--
Venkat
 
Michelle Lee
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you sita for you answer.
I just did like you say, and put the war in tomcat\webapps\war_file.war.
and access http://localhost:8080/war_file
it just gave me a list of links for html file in the root of war_file.
when I ry to access one of the servlet by:
http://localhost:8080/war_file/servlet/SpecialServlet. It was writing: 404 Not Found.
Any body can give me some advice?
Thank you.
 
Sita Kodali
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess your url should be http://localhost:8080/servlet/ServletName instead of http://localhost:8080/war_file/servlet/ServletName, coz all the servlets are mapped as /servlet URLs.
Also check web.xml in webapps/war_file_folder/WEB-INF.
HTH
--
Venkat
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic