Link to home
Start Free TrialLog in
Avatar of daluu
daluuFlag for United States of America

asked on

setting up a virtual directory in Tomcat 4.1

I've got Tomcat 4.1 setup on a server, with default settings (ie port 8080, web root = Tomcat default, etc.)

How can I setup a virtual directory in Tomcat so that the URL
http://serverurl/testdir refers to c:\inetpub\wwwroot\testdir (where testdir is NOT a virtual dir on IIS but happens to be a dir in wwwroot)

I tried adding this line in server.xml, right below Tomcat Root context and above Examples context:
<Context path="/team5" docBase="../../Inetpub/wwwroot/team5" debug="0" reloadable="true"/>
also tried referencing dobBase as C:\inetpub\wwwroot\team5 and C:\\inetpub\\wwwroot\\team5 but all three didn't work. Root dir is C:\Tomcat 4.1\webapps\ROOT

Everytime, restarting, I get 404 when testing the virtual directory. other than that tomcat runs ok.

I had originally wanted to setup Tomcat with IIS, but that didn't work on Win 2003, but here I can't even get Tomcat to use virtual directories (on Win 2003)

Am I missing something here?
Avatar of daluu
daluu
Flag of United States of America image

ASKER

in case forgot to mention serverurl means serverurl:8080
ASKER CERTIFIED SOLUTION
Avatar of heskyttberg
heskyttberg

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of daluu

ASKER

it still doesn't work.

in my opinion, it seems to only recognize directories within the webapps folder. Too bad I can't use a Windows shortcut equivalent to Unix's symbolic link as a virtual directory work around.

any other ideas what I can do about this?
Avatar of daluu

ASKER

Well, I got lucky!  I found a workaround using a Window's version of symbolic links that could "fool" Tomcat to think the link was an actual directory within the webapps directory, from here: http://www.sysinternals.com/ntw2k/source/misc.shtml#junction

thanks for the help heskyttberg,

but before finalizing the question, I would like to know what's the issue with Tomcat not recognizing virtual directories on my system. anybody have a clue?
Avatar of floating_carcass
floating_carcass

does tomcat 4.1 have virtual directories at all?