I suspect that you may have problems pointing to the external file.
You have file://
I have file:///
Also, I think it is better to use relative references


----- Original Message -----
From: "Dan Miser" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; "Jonathan" <[EMAIL PROTECTED]>
Sent: Wednesday, June 20, 2001 3:15 PM
Subject: Re: Extending ActionServlet


> I understand entity references in XML. That wasn't the problem. I'll start
> the ball rolling by showing you exactly what I did to struts-example, and
> you can tell me if this is what you did to get Struts to work in a module
> approach (using entity references).
>
> Here's my complete struts-config.xml:
> <?xml version="1.0" encoding="ISO-8859-1" ?>
>
> <!DOCTYPE struts-config PUBLIC
>           "-//Apache Software Foundation//DTD Struts Configuration
1.0//EN"
>           "http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd";
>   [<!ENTITY global       SYSTEM
> "file://d:/tomcat/webapps/struts-example/WEB-INF/global.xml">
>    <!ENTITY logon        SYSTEM
> "file://d:/tomcat/webapps/struts-example/WEB-INF/logon.xml">
>    <!ENTITY registration SYSTEM
> "file://d:/tomcat/webapps/struts-example/WEB-INF/registration.xml">
>    <!ENTITY subscription SYSTEM
> "file://d:/tomcat/webapps/struts-example/WEB-INF/subscription.xml">
>    <!ENTITY admin        SYSTEM
> "file://d:/tomcat/webapps/struts-example/WEB-INF/admin.xml">
>   ]
> >
> <struts-config>
>   &global;
>   &logon;
>   &registration;
>   &subscription;
>   &admin;
> </struts-config>
>
> Here's the admin.xml file:
>   <action-mappings>
>     <action    path="/admin/addFormBean"
>                type="org.apache.struts.actions.AddFormBeanAction"/>
>     <action    path="/admin/addForward"
>                type="org.apache.struts.actions.AddForwardAction"/>
>     <action    path="/admin/addMapping"
>                type="org.apache.struts.actions.AddMappingAction"/>
>     <action    path="/admin/reload"
>                type="org.apache.struts.actions.ReloadAction"/>
>     <action    path="/admin/removeFormBean"
>                type="org.apache.struts.actions.RemoveFormBeanAction"/>
>     <action    path="/admin/removeForward"
>                type="org.apache.struts.actions.RemoveForwardAction"/>
>     <action    path="/admin/removeMapping"
>                type="org.apache.struts.actions.RemoveMappingAction"/>
>   </action-mappings>
>
> The other xml files are similar to admin.xml, except they define
form-beans,
> action-mappings, etc. that are specific to the area of functionality they
> are grouped in (e.g. logon, registration, etc.)
>
> Using this approach, struts-example will not work. Do you get different
> results?
> --
> Dan Miser
> http://www.distribucon.com
>
> ----- Original Message -----
> From: "Jonathan" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, June 20, 2001 1:27 PM
> Subject: Re: Extending ActionServlet
>
>
> > Hello Dan.  If you have ANT, that is a good example.  If not, than just
> make
> > sure you DO NOT HAVE A COMPLETE XML DOCUMENT IN THE FRAGMENT.
> >
> > ex.
> >
> >
> > The include file "myInclude.inc" would contain:
> > <!-- Properties -->
> >      <property name="weblogic.install.dir" value="/weblogic"/>
> > <!-- End of properties -->
> >
> > Notice this IS NOT VALID XML.  Thats because it will be shoved into the
> > struts-config.xml which IS valid xml.
> >
> > Then you will declare these includes in the struts-config.xml file on
the
> > FIRST LINE of struts-config.xml like this:
> > <!DOCTYPE project [
> > <!ENTITY config1 SYSTEM "file:///config1.inc>
> > <!ENTITY config2 SYSTEM "file:///config2.inc>
> > ]>
> >
> > Then you need to "include" these files (it acts like including).  Where
> you
> > want this to be inserted put it in like this
> > &config1;
> >
> > You may recognize this because it is an "entity".  You declared the
entity
> > at the top with <!ENTITY config1 SYSTEM "file:///config1.inc>.  Because
of
> > this declaration you can now refer to the external file as &config1;
> inside
> > struts-config.xml, and it will plug the whole contents of that file in
> place
> > of &config1;  Get it?  If not e-mail me back.
>
>

Reply via email to