I have to admit that I couldn't get the ENTITY declaration to work in my 
struts-config.xml file, either.  It looks like it's some kind of directory-lookup 
problem with Tomcat, or something.  (I'm also using VisualAge, I'm not sure if that's 
related.)  The annoying thing is that I ran my struts-config.xml through a local xml 
validator, and it said it was fine (it successfully included the file), but Tomcat 
still chokes on it.  It tried various relative and absolute paths but couldn't get it 
to work.

However, I *did* get the file-including stuff to work if I pointed to a local copy of 
the struts-config_1_0.dtd and put the ENTITY declaration in the dtd file instead.  (I 
had to use a funky relative path to point to the local dtd.)  But it would be a lot 
nicer to be able to not have to edit the dtd all the time.

Has anyone gotten this to work with Tomcat?

- Doug Way
  [EMAIL PROTECTED]


TJM Todd McGregor wrote:
> 
> This doesn't work with the struts-config.xml file, at least not the way I'm
> trying. Here's what my file looks like:
> 
> <?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 login SYSTEM "./login-config.xml">
> ]>
> 
> <struts-config>
> .
> .
> .
> <action-mappings>
>         &login;
> </action-mappings>
> </struts-config>
> 
> Any suggestions?
> 
> -----Original Message-----
> From: Martin Cooper [mailto:[EMAIL PROTECTED]]
> Sent: Friday, May 18, 2001 5:03 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Splitting up struts-config.xml
> 
> You can split up the file using XML techniques. See the entry at the end of
> Ted Husted's "Struts Threads" page at:
> 
> http://www.husted.com/about/struts/threads.htm
> 
> or the equivalent entry from the Jakarta Ant FAQ at:
> 
> http://jakarta.apache.org/ant/faq.html#xml-entity-include
> 
> Hope this helps.
> 
> --
> Martin Cooper
> 
> At 04:11 PM 5/18/01, Doug Way wrote:
> 
> >I'm working as part of a team on a large-ish web application using struts.
> >
> >There are several of us currently working on the struts/jsp side of
> >things, and there's now quite a bit of stuff (action mappings, etc.) in
> >the struts-config.xml file, so each of us has to change this file fairly
> >often, and we're often in conflict with each other.  (I guess part of the
> >problem is that we're using a source code management tool (SourceOffSite)
> >with a pessimistic check-in/check-out system, without automated merging.)
> >
> >Anyway, is there some way to split up the contents of struts-config.xml,
> >so that it's not one huge file?  (Maybe with includes, or something
> similar?)
> >
> >- Doug Way
> >   [EMAIL PROTECTED]

Reply via email to