daluu
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/www root/team5 " debug="0" reloadable="true"/>
also tried referencing dobBase as C:\inetpub\wwwroot\team5 and C:\\inetpub\\wwwroot\\team 5 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?
How can I setup a virtual directory in Tomcat so that the URL
http://serverurl/testdir refers to c:\inetpub\wwwroot\testdir
I tried adding this line in server.xml, right below Tomcat Root context and above Examples context:
<Context path="/team5" docBase="../../Inetpub/www
also tried referencing dobBase as C:\inetpub\wwwroot\team5 and C:\\inetpub\\wwwroot\\team
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?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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?
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?
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?
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?
does tomcat 4.1 have virtual directories at all?
ASKER