|Jann VanOver||Jul 13, 2001 2:11 pm|
|Alan Inser||Jul 15, 2001 11:45 pm|
|Sabarish Muthumperumal||Jul 15, 2001 11:59 pm|
|Ted Husted||Jul 16, 2001 3:11 am|
|Grant Davies||Jul 16, 2001 2:42 pm|
|Craig R. McClanahan||Jul 30, 2001 9:26 pm|
|Bill Clinton||Jul 31, 2001 1:21 pm|
|Craig R. McClanahan||Aug 5, 2001 1:48 pm|
|Subject:||Re: Stuts behind a firewall.|
|From:||Craig R. McClanahan (crai...@apache.org)|
|Date:||Aug 5, 2001 1:48:13 pm|
On Tue, 31 Jul 2001, Bill Clinton wrote:
Craig, You say that "you should be able to run with no problems, without trying to access the network." But it seems to me that the internal DTDs are used only after an attempt to access them via the network times out. Am I mistaken on this? It seems that when I start my server (either orion or resin) without internet access, it stalls for a pretty good amount of time.
While this timeout may be fine when you are demoing some apps on your laptop, it can be a real pain in the a$$ while developing. Is there anyway to configure struts to use the internal DTDs without trying to find them on the network first? Or anyway to change the timeout?
Whether or not it tries the network first is probably an issue of which XML parser you're using. For me, I've detected no discernable delay that could be attributed to this.
I've tried Struts with both JAXP and Xerces in offline situations, and turned on the Digester's debugging output. I'm pretty much convinced that neither of these parser's will *ever* try the network if an alternate registration is available.
In SAX API terms, the parser is supposed to call the resolveEntity() method of your document handler (i.e. the Digester main class, for the purposes of this discussion). If the resolveEntity() method returns a valid input source (based on matching the public ID *exactly*), then it should just ignore the system id that would send it out the network.
When you run with the debugging detail level turned up, do you see the message "Resolving to alternate DTD" in the log output? If so (and the parser tries to access the network anyway), it's a parser problem. If not, that means Struts does not think your public ID matches exactly the one it is looking for.
It seems that the internal copies of the DTDs are only accessed after
Craig R. McClanahan wrote:
Struts maintains internal copies of the DTDs it uses (for struts-config.xml and web.xml). As long as you use the correct public identifier on your configuration files (and your XML parser is correctly implemented) you should be able to run with no problems, without trying to access the network fr the DTDs. In fact, I run Struts-based apps all the time on a completely disconnected laptop (with Tomcat and JAXP/1.1) with no problems.
On Mon, 16 Jul 2001, Grant Davies wrote:
I'm trying to test our first struts app with weblogic and our web.xml file goes out to sun for the DTD to validate the web.xml file
We are behind a firewall that uses a proxy on port 8080 for http requests, but our proxy requires us to login every time a new HTTP session is invoked.
Is there anyone who can help me configure our stuts for this? I know this may be more of a JAVA question that stuts, but I've been lucky enough to use relaxed firewalls in the past.
Is it simpler just to remove the DTD url from the web.xml so it does not get validated?
Thanks Grant Davies Insolutions Inc.