You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Matt Mejaski <mm...@alumni.uwaterloo.ca> on 2004/09/24 15:20:06 UTC

Use Tomcat to access Other Directories On Server (outside of webapps/) With Authentication

Hi all,

I'm currently developing a web app, and I'm currently using Apache HTTP
Server as well as Tomcat.

Tomcat is my Java and JSP Servlet container.  Apache HTTP Server is
(obviously) a server to serve my static pages (that are changed from the
Java code).

Currently, in Apache, I have some Alias'es to point to other directories on
the server (i.e. Alias /MyStuff C:\MyStuff), and then, I use a .htaccess
file to control access to /MyStuff.

Now, I was wondering if I could get rid of Apache altogether and only use
Tomcat.

I can set up a <Context> in Tomcat for my Apache Alias'es (i.e. <Context
path="/MyStuff" docBase="C:\MyStuff">), but I don't know how to control
security on that Context!  

I want to start using Container Security (i.e. like in the Servlet specs),
but this means i can only use container security for those 'alias' Contexts
if I put a web.xml in a WEB-INF subfolder, which I don't really want to
do....

In Tomcat, is there an alternative way that i can use an Alias that will
share the security of my main app if my main app uses Container Managed
Security?

Oh -- right now I'm using Tomcat 4.1.18, but if necessary I can upgrade.



Hopefully someone can help. =)
Thanks,
Matt



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org