tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cox, Charlie" <c...@cincom.com>
Subject RE: WebappClassLoader
Date Mon, 21 Apr 2003 16:46:05 GMT
I think this is because the instance was created by the server classloader
and you are trying to cast to a different copy with a different(the
webapp's) classloader. 

How did you get your webapp to recognize WebappClassLoader as a valid class?
Did you just copy catalina.jar to your WEB-INF or something like that? you
can't do that. You will have to remove any copies of catalina.jar(outside of
/server/lib) and then the doPrivledged="true" should work.

Charlie

> -----Original Message-----
> From: Tim Funk [mailto:funkman@joedog.org]
> Sent: Monday, April 21, 2003 12:22 PM
> To: Tomcat Users List
> Subject: Re: WebappClassLoader
> 
> 
> 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