Solved

setting up a virtual directory in Tomcat 4.1

Posted on 2003-10-28
5
3,486 Views
Last Modified: 2012-08-13
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?
0
Comment
Question by:daluu
  • 3
5 Comments
 
LVL 4

Author Comment

by:daluu
ID: 9637091
in case forgot to mention serverurl means serverurl:8080
0
 
LVL 8

Accepted Solution

by:
heskyttberg earned 150 total points
ID: 9640555
Hi!

You need to refer to it as:
C:/inetpub/wwwroot/team5

/Hasse
0
 
LVL 4

Author Comment

by:daluu
ID: 9645043
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?
0
 
LVL 4

Author Comment

by:daluu
ID: 9645700
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?
0
 

Expert Comment

by:floating_carcass
ID: 11479395
does tomcat 4.1 have virtual directories at all?
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now