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 Tue, 22 Apr 2003 12:40:14 GMT
the attribute name is "privileged". see the doc:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/context.html

you will have to restart tomcat.

I'm still interested in knowing how you avoid a ClassNotFoundException,
because without this attribute, your webapp's classloader would not know
where to find the class implementation.

Charlie

> -----Original Message-----
> From: Sanda John P [mailto:sandaj@cs.clemson.edu]
> Sent: Monday, April 21, 2003 5:09 PM
> To: Tomcat Users List
> Subject: Re: WebappClassLoader
> 
> 
> 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
> 

---------------------------------------------------------------------
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