You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Weissman, Alan" <al...@solspark.com> on 2003/07/11 22:02:58 UTC

struts-config.xml Validation At Server Startup

I was running some tests with my Tomcat server and moved it to a place on
the network where it was unable to access the internet.  Tomcat started
fine, but Struts threw an I/O exception on struts-config.xml, even though
the file was there and was fine.  I think that this I/O exception is due to
Struts attempting to validate the xml against the dtd specified in the
DOCTYPE header by getting the dtd over the network.  Is this true?  Is there
a way to control how Struts validates the file?

Thanks,
Alan

Alan Weissman
Systems Engineer
Concord Financial Technologies
(212) 532 8160 x129
alan@solspark.com


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: struts-config.xml Validation At Server Startup

Posted by Yann C�bron <ya...@yahoo.de>.
Hi Alan,

> I was running some tests with my Tomcat server and moved it to a place on
> the network where it was unable to access the internet.  Tomcat started
> fine, but Struts threw an I/O exception on struts-config.xml, even though
> the file was there and was fine.  I think that this I/O exception is due
to
> Struts attempting to validate the xml against the dtd specified in the
> DOCTYPE header by getting the dtd over the network.  Is this true?

Yes, the default is a validating parser. My guess: the URI of the DTD you
specified in your struts-config.xml doesn't match the URI of the DTD
included in struts.jar (the ActionServlet registers its own copies upon
startup and shouldn't need to access them via internet).

> Is there
> a way to control how Struts validates the file?

You can turn off validation by setting validatin=false in the init-param
section for your ActionServlet in web.xml.

HTH,
    Yann




---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org