• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

where to put war

 
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!
 
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
 
Getting married means "We're in love, so let's tell the police!" - and invite this tiny ad to the wedding:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic