My "..." in the second line needs to be replaced by the usual public and
system identifiers -- I pushed SEND before I went back and looked them up
in the docs :-(
Craig
On Wed, 8 Aug 2001, Daniel Toms wrote:
> Craig, or anyone,
>
> Has anyone actually gotten the below xml inclusion mechanism to
> work using struts and tomcat 3.2.1? I searched other
> messages about this in the archives and none of the authors
> were successful. I always get a parse error like:
>
> che/struts/resources/web-app_2_3.dtd'
> Parse Fatal Error at line 5 column -1: Relative URI "forms.xml"; can not be
> reso
> lved without a document URI.
> org.xml.sax.SAXParseException: Relative URI "forms.xml"; can not be resolved
> wit
> hout a document URI.
>
> Our application is getting large and I would dearly like to use
> this idea to split up the config file....
>
> thanks,
>
> dan
>
> > -----Original Message-----
> > From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, August 08, 2001 12:41 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: ActionServlet.addMapping() persistence
> >
> >
> >
> >
> >> There's an XML trick that lets you do this without needing to modify
> > Struts. Consider that you've got a struts-config.xml file divided into
> > three parts ("form-beans.xml", "global-forwards.xml", and
> > "action-mappings.xml") stored in the /WEB-INF directory. They can be
> > combined automatically by doing something like this in
> > "struts-config.xml":
> >
> > <?xml version="1.0"?>
> > <!DOCTYPE ... [
> > <!ENTITY part1 SYSTEM "form-beans.xml">
> > <!ENTITY part2 SYSTEM "global-forwards.xml">
> > <!ENTITY part3 SYSTEM "action-mappings.xml">
> > ]>
> >
> > <struts-config>
> >
> > <form-beans>
> > &part1;
> > </form-beans>
> >
> > <global-forwards>
> > &part2;
> > </global-forwards>
> >
> > <action-mappings>
> > &part3;
> > </action-mappings>
> >
> > </struts-config>
> >
> > Obviously, you can extend this concept to any reasonable separation of
> > struts-config.xml into subordinate files.
> >
> > > I suppose I could update struts-config.xml and then tell the
> > ActionServlet
> > > to reread it in the Action I talked about in the first
> > paragraph...I'd like
> > > to be able to seperate this out, if possible, to make the seperate
> > > components of my webapplication seperate. The problem with
> > putting this all
> > > into individual webapps is that I want the session to be passed
> > from one
> > > part of the webapp to the next.
> > >
> >
> > The other approach would be to keep the individual pieces of
> > struts-config.xml in separate files in your source repository, and use the
> > Unix "cat" tool (or the DOS "copy" tool using plus signs) to concatenate
> > the pieces together as you deploy the web app.
> >
> > > Any thoughts?
> > > Thanks,
> > > Becky
> > >
> >
> > Craig
> >
>
>