Solved

setting up a virtual directory in Tomcat 4.1

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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How do Apache, PHP, and MySQL All Work Together? 6 86
IPA - can it be run on a web server? 3 173
LAMP problem identifier tool ? 9 116
Best IDE for PHP starters 11 121
Over the last year I have answered a couple of basic URL rewriting questions several times so I thought I might as well have a stab at: explaining the basics, providing a few useful links and consolidating some of the most common queries into a sing…
Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

815 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

11 Experts available now in Live!

Get 1:1 Help Now