Re: Stuts behind a firewall.
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. > Bill > Craig > > 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. > > > > Craig > > > > > > On Mon, 16 Jul 2001, Grant Davies wrote: > > > > > >> Hi, > >> > >> 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. > >> > >> > >
Re: Stuts behind a firewall.
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? Bill 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. > > Craig > > > On Mon, 16 Jul 2001, Grant Davies wrote: > > >> Hi, >> >> 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. >> >>
Re: Stuts behind a firewall.
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. Craig On Mon, 16 Jul 2001, Grant Davies wrote: > Hi, > > 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. > >
Stuts behind a firewall.
Hi, 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.