Craig,
I took my project home to work on it last night. I have a small LAN at home
that connects to the 'Net through a dialup on a file server. I was unable to
get my Struts 1.0 application working without being dialed in to my ISP.
Whenever I started up Tomcat without being connected to the 'Net, I would
get the message that
"http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd" could not be
located, and struts-config.xml would never be parsed. When I was connected,
everything worked fine. The strange thing was, when I was connected to the
'Net, the messages would say that Struts was using the local copy of the
DTD, but the check was still made.
I don't know if I'm making much sense here. Basically, I had to be connected
to the 'Net in order for Struts to start up properly. This seems to be at
odds with what you said below. Am I missing a config parameter somewhere, or
is there something else that I should check?
Thanks,
Chad Johnston
Sunset Group Limited
(719) 535-6284
[EMAIL PROTECTED]
[EMAIL PROTECTED]
-----Original Message-----
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 14, 2001 10:48 AM
To: [EMAIL PROTECTED]
Subject: Re: DTD Location
On Thu, 14 Jun 2001 [EMAIL PROTECTED] wrote:
> Currently, the XML indicates that the DTD is located over the web using a
> public qualifier. Does it really check over the web for the DTD to
> validate against? I would rather not do this for performance reasons. If
> it does, can I change the reference to a SYSTEM ref instead. What is the
> recommended approach for a production implementation?
>
If you look inside the controller servlet, you'll see that it registers a
local copy of the struts-config DTD, as well as the web.xml DTDs, with the
XML parser (the digester.register() calls). This tells the parser to use
the local copy when a request for the specified public identifier is made.
Among other things, that means you can run Struts-based apps even when you
are not connected to the internet. As long as your struts-config.xml file
has the correct public identifier, Struts does *not* go across the net to
perform the validation.
> Thanks in Advance,
> Ken Hoying
> Practice Partner
> TITAN Technology Partners
> Pager: 216-275-7284
>
>
Craig McClanahan