• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Tomcat War

 
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to deploy a war file to my TOMCAT_HOME/webapps dir. I have several web applications listed under webapps so I am relying on several <Context...> element entries in the server.xml file.
<Context path="/realationships" docBase="realationships" debug="0"
crossContext="true">
(Based on an earlier post I have removed the reloadable="true" attribute.)
Also, the directory TOMCAT_HOME/webapps/realationships has been deleted since I read in the Tomcat Bible that when realationships.war is present the realationships directory must be removed. The Tomcat Bible does not make any mention of having to remove the <Context...> element (based on my cursory review).
When bringing up the web browser I get a
Apache Tomcat/4.0.2 - HTTP Status 404 - /realationships
The requested resource (/realationships) is not available.
My knowledge of Tomcat is very rudimentory. Please advise.
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There are attributes in the conf/server.xml file that control automatic unpacking of WARs. Here is what I found as the default in Tomcat 4.24 - I don't remember what the default is in earlier Tomcats.

You do need to restart the server for this to work. Alternately you can use the management application to deploy WARs without stopping Tomcat.
Bill
 
Nadine McKenzie
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
After much finagling and re-visiting of some of the earlier threads, it finally sank in. Although this information exists in the threads, I'm condensing it here in case someone else runs into the same situation.
Here're are the steps I took to get it to work. Let's assume the name of your web app is mywebapp1.
(1) if there is a context entry in $TOMCAT_HOME/conf/server.xml that looks like this...
<Context path="/mywebapp1" docBase="mywebapp1" debug="0" reloadable="true" crossContext="true"> ...
Remove the entire entry!
(2) once you have your webapp1.war file created, place it in $TOMCAT_HOME/webapps
(3) remove the directory called $TOMCAT_HOME/webapps/webapps1
(this step may not be necessary but I'm including it here since I read this in a book)
 
Do not meddle in the affairs of dragons - for you are crunchy and good with ketchup. Crunchy tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic