Get the tools you need to learn Java skills fast!
Video tutorials, eBooks, hands-on lab exercises, sample code.
Get started
The moose likes Tomcat and the fly likes Run an application anywhere on my system Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Badass: Making Users Awesome this week in the Game Development forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Run an application anywhere on my system" Watch "Run an application anywhere on my system" New topic

Run an application anywhere on my system

Timothy Sam
Ranch Hand

Joined: Sep 18, 2005
Posts: 746
Hi guys, I've heard of editing the xml files in your TOMCAT_HOME/conf/Catalina/localhost. Placing an XML file there and putting the name of your application, changing the docBase, path, and workDir could actually make tomcat run your application from anywhere in your system. How come mine is not?

I did the following

1. Add AssetManagementSystem.xml
2. Edit the xml file like this...

3. Start Tomcat and invoke the URL in my browser...


I tried to change the slashes...

This didn't work also...

I'm making a struts application in exadel studio... There isn't really any struts involved here yet... I'm just testing if it would run... I didn't want to use the Tomcat server bundled with exadel or eclipse... Thanks!

SCJP 1.5 -
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42954
I'm not sure if you can specify a relative workDir path like that; simply leave out that parameter, and Tomcat will figure out a good place to put it.

And this only works on Tomcat 5.0 and newer, so make sure your version is not too old.
[ January 04, 2006: Message edited by: Ulf Dittmer ]
Pavan Tummala
Ranch Hand

Joined: Dec 25, 2004
Posts: 74
removing the workdir should work, it works even on tomcat 4.1

If Java had true garbage collection, most programs would delete themselves upon execution -- Robert Sewell
I agree. Here's the link:
subject: Run an application anywhere on my system