tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <>
Subject RE: getResourceAsStream cached by Tomcat's Classloader?
Date Thu, 05 Jun 2003 15:24:39 GMT


>When I load my-config.xml using
>Classloader.getResourceAsStream("my-config.xml") everything works
>However, when I make a change to that file and again call
>Classloader.getResourceAsStream("my-config.xml") the changes are not
>up and the same initial resource is returned. How do I get the
>to reconginze the resource changes? I'm using Tomcat 4.1.18.

I haven't looked at that code for a while myself, but I wouldn't be
surprised if that were cached.  It'd be a performance win, especially
for frequently accessed resources.  I don't think the servlet
specification mandates resource caching, nor mandates that it be
configurable -- both of these are container implementation details.

I would guess that if you restart your webapp, the resource cache would
be reset.  But that may not be what you want to do...

Yoav Shapira

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