You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Robert Taylor <rt...@mulework.com> on 2002/06/13 03:37:23 UTC

RE: Cannot reload web app because Digester is locking struts.jar file (SOLVED)

When Digester registers the DTDs, it uses the classloader
to resolve the location of the resources. I found two solutions:

1. Remove the DTDs from the struts.jar file, then Digester is
unable to register the local resources and is forced to look externally
for resolution.

2. Place the DTDs in the WEB-INF/classes directory. When Digester registers
the resources the class loader first looks in the WEB-INF/classes directory,
and then the WEB-INF/lib directory and then the system class path. Since
Digester
finds them in the WEB-INF/class directory the struts.jar file is not locked.
I'm not sure if the resource location strategy is standard among servlet
containers,
but it seems to work for us.

We use #2.

robert

> -----Original Message-----
> From: Robert Taylor [mailto:robertandkarentaylor@yahoo.com]
> Sent: Wednesday, June 12, 2002 10:26 AM
> To: struts-user@jakarta.apache.org
> Subject: Cannot reload web app because Digester is locking struts.jar
> file
>
>
> I'm using Struts 1.0 and have run into a problem where
> my servlet containers auto-deploy (unpack war file
> into an open directory structure) is failing to delete
> the necessary directories because the struts.jar is
> locked.
>
> Apparently this happens because
> Digesters.resolveEntity() returns an InputSource
> stream to the local struts-config DTD. This locks the
> struts.jar file until I shut down my servlet
> container.
>
> This problem doesn't seem to happen when Digester
> cannot find the DTD referenced by the public id and
> is forced to use the system identifier.
>
> Is there a way I force Digester to use the external
> struts-config DTD and not the one in the struts.jar?
>
> robert
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! - Official partner of 2002 FIFA World Cup
> http://fifaworldcup.yahoo.com
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>