You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Rob Leland <Ro...@freetocreate.org> on 2001/04/09 17:01:48 UTC

Re: FOLLOWUP: struts-config_1_0.dtd location when not connected to internet

That was the same fix that was made to struts about a month ago,
it now has a copy of the DTD in the jar file.
I am also using JBuilder4 and since this change it works ok for me.

-Rob

"Young, Wayne" wrote:
> 
> I finally got back to working this issue. Recall, I was having the trouble
> running a struts application using Tomcat 3.2 & JBuilder 4 in debug mode
> while disconnected from the internet.
> 
> I resolved this issue by extracting the DTDs from the struts.jar to the
> WEB-INF\classes\org\apache\struts\resources directory. These DTD's were in
> the struts.jar in my WEB-INF\lib directory, but they weren't found at
> runtime.
> 
> Thanks.
> 
> Wayne
> wyoung@metasolv.com
> 
> -----Original Message-----
> From: Craig R. McClanahan [mailto:craigmcc@apache.org]
> Sent: Friday, March 30, 2001 11:38 AM
> To: 'struts-dev@jakarta.apache.org'
> Subject: RE: struts-config_1_0.dtd location when not connected to
> internet
> 
> On Fri, 30 Mar 2001, Cook, Levi wrote:
> 
> > Does using the local DTD require the DOCTYPE declaration to be modified??
> >
> > Thanks in advance,
> > Levi Cook
> >
> 
> No.  The XML parser looks at the public identifier (the part that starts
> "-//Apache ..." to see if it has a local copy.  If so, the system
> identifier (the URL) is totally ignored.
> 
> By the way, servlet containers do this for the web.xml DTD as well, which
> is why (for example) you can run Tomcat disconnected from the Internet
> without modifying any of your web.xml files.
> 
> Craig
> 
> > -----Original Message-----
> > From: Craig R. McClanahan [mailto:craigmcc@apache.org]
> > Sent: Friday, March 30, 2001 11:19 AM
> > To: Struts-Dev@Jakarta. Apache. Org (E-mail)
> > Subject: Re: struts-config_1_0.dtd location when not connected to
> > internet
> >
> >
> >
> >
> > On Fri, 30 Mar 2001, Young, Wayne wrote:
> >
> > > I'm trying to run my struts application disconnected from the internet.
> > >
> > > When I try to start Tomcat 3.2 in JBuilder4, it is unable to find the
> > > struts-config_1_0.dtd in the location below and won't load the action
> > > servlet. (as expected)
> > > <!DOCTYPE struts-config PUBLIC
> > >           "-//Apache Software Foundation//DTD Struts Configuration
> > 1.0//EN"
> > >           "http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd">
> > >
> >
> > Struts registers a local copy of the DTD for this (and for the web.xml
> > DTDs as well) at a path that should be in the struts.jar file:
> >
> >       /org/apache/struts/resources/struts-config_1_0.dtd
> >
> > which is then accessed via this.getClass().getResource().  If there is
> > something wierd about the classloader inside JBuilder4, it might have
> > problems with this -- I've successfully run Struts in detached mode on
> > Tomcat 3.2 stand alone.
> >
> > Craig
> >
> >