struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <>
Subject Re: javax.servlet.UnavailableException: Input/output error reading configuration from resource path /WEB-INF/struts-config.xml
Date Sat, 23 Jun 2001 02:17:31 GMT

On Fri, 22 Jun 2001, Jonathan Asbell wrote:

> However, I think it should be designed somehow to look locally for the dtd
> in this case.  I have seen alot of talk about this dtd issue in the last few
> weeks which is an indicator that a clearer explanation and minor code tweak
> are probably warranted.  It is not clear what the deafualt is, what happens
> with a struts.jar and without one, and where the dtd must reside. etc,etc.

It *is* designed to look locally first.  Since you are building from
soure, you might want to look before you suggest changes :-).  Then,
everything will become clear.

In the sources for ActionServlet, you will note that it registers
alternate locations for the struts-config DTD, as well as the webapp
deployment descriptor DTDs for servlet 2.2 and servlet 2.3.  These
alternate locations are within struts.jar, for the precise purpose of
avoiding the need to go across the network for the DTDs.

The problem comes from broken servlet containers that do not correctly
retrieve resources from the web application's JAR files (in
/WEB-INF/lib) or unpacked classes directory (/WEB-INF/classes).

As a result, on a correctly implemented servlet container, you can run
Struts based apps on a completely disconnected computer.  Anyone who saw
my JavaOne session on Thursday saw me do just that (running Struts over
Tomcat 4, on a laptop that was not connected to the net).


View raw message