Re: J2EE and setting the Context Classloader...

Mark Swanson <mark-e2GstmqqWGa5mcYau+xr2AC/[email protected]>
Newsgroups gmane.comp.java.beanshell.devel
Organization Web Service Solutions, Inc.
Message-ID <[email protected]>
On February 6, 2004 1:06 am, Pat wrote:
<snip>
> Thread setContextClassLoader() is a public method but has a security check.
>  I don't know if common security policies guard this one more than other
> things we use.
>
> Any thoughts?
>
> BTW, Weblogic 8.1. no longer suffers from the "old version of BeanShell in
> the weblogic.jar" name conflict problem.  You can just drop bsh.jar in your
> web apps, etc. and it works.

(sending to the list this time as my previous reply only went to Pat...)

I've been using BeanShell inside WLS 8.1 for a few weeks now. I simply added 
the BeanShell initialization to my StartupServlet (for the particular webapp 
I want BeanShell to work with). This way BeanShell has access to the right 
ClassLoader and it works.

_please_ do not setContextClassLoader() unless you catch and handle the 
SecurityException appropriately. SecurityException is one of those things that 
must always be caught and handled or BeanShell will never work properly in a 
secure environment.


-- 
Free calendar client and server - works with Exchange/Outlook
http://www.ScheduleWorld.com/
http://www.ScheduleWorld.com/sw/ScheduleWorld.jnlp (JWS)



-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.