tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sanda John P <san...@cs.clemson.edu>
Subject Re: WebappClassLoader
Date Mon, 21 Apr 2003 21:09:19 GMT
I added the following to server.xml.

<Context path="/nirex" docBase="nirex" debug="0"
   reloadable="true" crossContext="true"
   doPrivledged="true">
</Context>

I still wound up with the ClassCastException. I'm not really familiar with
the server configuration and explicitly adding contexts, so I'm not
surprised that I didn't have any luck. What else do I need to add to the
nirex context entry in server.xml? Thanks.

John Sanda, Clemson University Computer Science Dept.
(864)656-2844

On Mon, 21 Apr 2003, Tim Funk wrote:

> This is probably becasue org.apache.catalina.loader.WebappClassLoader lives
> in the server classloader and is not accessible to webapps. (for security)
>
> You might be able to do this in server.xml for your context.
> doPrivledged="true"
>
>
>
> -Tim
>
> Sanda John P wrote:
> > The following code resulted in a ClassCastException.
> >
> > <%
> >    WebappClassLoader loader =
> >       (WebappClassLoader)Thread.currentThread().getContextClassLoader();
> > %>
> >
> > I guess Thread.currentThread().getContextClassLoader() doesn't return the
> > WebappClassLoader, but when I printed out its class name, it said
> > WebappClassLoader.
> >
> > John Sanda, Clemson University Computer Science Dept.
> > (864)656-2844
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>

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


Mime
View raw message