tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Bubnic" <>
Subject RE: Applet sharing utility class with Servlet
Date Tue, 02 May 2006 03:47:37 GMT
Thanks for the quick reply. Looks like I'm keeping two copies.. serves
me right for making my own storage objects for niceness.

-----Original Message-----
From: Jess Holle [] 
Sent: Tuesday, 02 May 2006 12:06 PM
To: Tomcat Users List
Subject: Re: Applet sharing utility class with Servlet

This is a "feature" of the servlet spec.

To use a class from both client and server you're forced to have 
multiple copies of it in your web app -- or alternatively to do 
non-standard adjustments to the web app loader / classpath.

If you don't have too many of these copy cases, I advise just having 
your build process produce the necessary copies.

Unfortunately, some of us have *lots* of these cases.  The lack of a 
"common" area which is accessible to client and server classloaders is a

very unfortunate gap in the servlet spec in this case.

Andrew Bubnic wrote:
> Hi guys, hoping someone has an answer to this:
> I have a servlet and an applet running in the same webapp. The servlet
> needs to access a class the applet .jar contains. The applet is
> to the browser.
> Problem is: I need to access this applet utility class (or it could be
> any class really, outside the WEB-INF folder but inside the current
> webapp) from the servlet. I don't want to actually access the running
> applet on the user's end, just the .class on the server webapp (so I
> instantiate it etc). I also don't want to have to keep a copy of this
> utility class with the servlet class as a work-around as it's rather
> inelegant.
> I have heard you can modify web.xml in the webapp\WEB-INF folder to
> allow access to any .class/.jar in the current webapp but I haven't
> able to find how to do this.
> If you have any ideas or leads about this problem, please let us know.
> Thanks guys.

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message