• 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
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Webapps and Context Path

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have 2 application deployed in one server ( Tomcat 7.0.28 ) and we have also update the context path in server.xml as below

We have noticed sometime the context path directories ( XX and YY ) are creating in webapps directory when the server gets rebooted. So the webapps has below folders.

app1.war app1 app2.war app2 XX YY

We have builded are more than 10 servers and only couple of servers have this issue.

Any thoughts ?

-M
 
Sheriff
Posts: 67590
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What's the issue? The wars are being unpacked into a folder structure. This is the normal default behavior.

There is a setting (not sure which off the top of my head) to have Tomcat simply run the app out of the war without "exploding" it, if that's what you want. Look through the Tomcat docs for configuration and you should find it.
 
Saloon Keeper
Posts: 24283
167
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You should NOT put your context definitions in the server.xml file. That behaviour has been discouraged since Tomcat4 first came out. Put each context definition in its own file with an ".xml" suffix and place the files in the TOMCAT_HOME/conf/Catalina/localhost directory. Note that the context name that the app will be deployed under will be taken from the context filename (minus the ".xml" part, and not from the name in the Context element itself

The option for keep WARs from being exploded is "unpackWAR". http://tomcat.apache.org/tomcat-6.0-doc/config/context.html
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic