Venkatesh Prasad Ranganath wrote:
> Hi,
>
> I would like to configure tomcat such that it handles servlets/jsps if
> the users place their servlets and jsp in a particular directory, say
> servlet-jsp, in their web home directory (public_html on apache/linux).
>
> I know I can use <Context> to achieve this but then there will have to
> be a context for each user. I was wondering if there was some way to
> use wildcards like we do in apache when setting properties of
> public_html. How can we indicate that what ever occurs in place of * in
> docBase should be the same as that which occurred for * in path?
>
> <Context path="/*/servlet-bin"
> docBase="/home/*/public_html/servlet-bin"
> crossContext="false"
> debug="9"
> reloadable="true" >
> </Context>
>
> Thanx in advance,
>
Tomcat does not support any mechanisms for wild card entries like this.
However, Tomcat 4.0 does have a facility similar to this (and similar to the way
Apache does things). You can configure Tomcat 4.0 so that a URL like this:
http://localhost:8080/~craigmcc
selects the web application installed in the "public_html" directory underneath
the operating system home directory for user "craigmcc". This is done by adding
a configuration entry nested inside the <Host> directive:
<Host name="localhost" ... >
...
<Listener className="org.apache.catalina.startup.UserConfig"
directory="public_html"
userClass="org.apache.catalina.startup.PasswdUserDatabase"/>
...
</Host>
Note that the operating system username Tomcat is running under *must* have read
access to each user's public_html directory and its contents for this to work.
>
> - Venkatesh
>
Craig McClanahan
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]