Solved

setting up a virtual directory in Tomcat 4.1

Posted on 2003-10-28
5
3,491 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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As Wikipedia explains 'robots.txt' as -- the robot exclusion standard, also known as the Robots Exclusion Protocol or robots.txt protocol, is a convention to prevent cooperating web spiders and other web robots from accessing all or part of a websit…
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 …
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

867 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

12 Experts available now in Live!

Get 1:1 Help Now