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

Question about auto-deploying WAR files and resulting URL?

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Here's my situation...

I have three instances of Tomcat (6.020) running on the same server (Windows 2003).
One instance is for dev (development), one for test (test and demo) and one for stage (to solve production bugs).

Each one of them answers to a specific host name (and IP):
server-dev.domain.com
server-test.domain.com
server-stage.domain.com

Here's my "Host" in one of my server.xml (dev):
<Host name="server-dev.domain.com" appBase="webapps/dev" unpackWARs="true" autoDeploy="true" deployOnStartup="false" />

As you can see, by copying a .WAR file inside the "webapps/dev" folder, this application will be automatically deployed inside Tomcat.
This will give me a URL similar to this:
http://server-dev.domain.com/Application/index.jsp (if my .WAR file was named Application and contains a file named index.jsp).

However, I would like to have a URL like this:
http://server-dev.domain.com/dev/Application/index.jsp
(I know the environment is specified twice, but I want to be standard with other web servers that we have).

I tried setting my "appBase" to "webapps" only, and then copy my WAR file inside my "dev" folder, but it looks like applications are not deployed when not in the root "appBase" (doesn't work with nested folders).

I took a look at "Context", and tried something like this in my server.xml:
<Context docBase="Application.war" path="/dev/Application" />
It looks like it's doing what I want, but it doesn't work.

I'm new to Tomcat, so sorry if this is an easy one... but I just don't know how to achieve this....

Thanks in advance for your help!
 
Canam Group
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Anyone?

Thanks!
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic