tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <>
Subject RE: Subclassing DefaultServlet
Date Wed, 18 Aug 2004 13:19:51 GMT

Can you just use a Filter and save yourself a ton of trouble?

Yoav Shapira
Millennium Research Informatics

>-----Original Message-----
>From: Frans Flippo []
>Sent: Wednesday, August 18, 2004 8:42 AM
>To: Tomcat Users List
>Subject: Subclassing DefaultServlet
>I've added some functionality to DefaultServlet by subclassing it (i.e.
>we need to do some special processing to certain URLs, for others I
>just call super.doGet(...)). I compiled the DefaultServlet subclass
>against Tomcat's servlets-default.jar in server/lib and deployed it in
>my web application (adding a relevant servlet mapping to my web.xml).
>When I first tried it I got a ClassNotFoundException for
>probably due to the fact that the Tomcat server and the web
>use seperate class loaders, so our web application's class loader does
>not have a copy of DefaultServlet loaded. I had to copy several JARs
>from server/lib to my web application's WEB-INF/lib directory,
>servlets-default.jar, which contains DefaultServlet. I'd rather just
>refer to the JARs in server/lib, though. That way I know that when the
>web application is deployed to a newer version of Tomcat, the
>DefaultServlet I'm subclassing from and the one Tomcat uses will be the
>Besides symlinking, is there any way achieve this? Can I tell tomcat to
>also include server/lib in the classpath for my webapp?
>Thanks in advance,
>Quinity : Your Partner In eBusiness Solution Delivery
>Biltstraat 449
>3572 AW Utrecht
>P.O. Box 13097
>3507 LB Utrecht
>The Netherlands
>Telephone: (+31) (0)30 2335999
>Fax      : (+31) (0)30 2335998
>WWW      :
>The information transmitted is intended only for the person or
>entity to which it is addressed and may contain confidential
>and/or privileged material. Any review, retransmission,
>dissemination or other use of, or taking of any action in
>reliance upon, this information by persons or entities other
>than the intended recipient is prohibited. If you received
>this in error, please contact the sender and delete the material
>from any computer. Quinity is neither liable for the proper and
>complete  transmission of the information contained in this
>communication nor for any delay in its receipt.
>To unsubscribe, e-mail:
>For additional commands, e-mail:

This e-mail, including any attachments, is a confidential business communication, and may
contain information that is confidential, proprietary and/or privileged.  This e-mail is intended
only for the individual(s) to whom it is addressed, and may not be saved, copied, printed,
disclosed or used by anyone else.  If you are not the(an) intended recipient, please immediately
delete this e-mail from your computer system and notify the sender.  Thank you.

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

View raw message