• 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

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: 67752
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: 28319
210
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
 
What do you have in that there bucket? It wouldn't be a tiny ad by any chance ...
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