struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Jouravlev <>
Subject Re: Why I Hate Struts Modules
Date Wed, 12 Oct 2005 17:48:43 GMT
On 10/11/05, David G. Friedman <> wrote:
>  Paul,
> > See, after all these years, I really wanted was to
> > split files up. Modules don't gain me anything, do
> > they? I know (or I think) when Craig wrote Struts 0.x,
> > he had an action.xml which did something similar....
> > Now I could create file of just actions and use XML
> > ENTITIES to include them, but I never see people doing
> > that solution. Is it not well-known or frown upon?
> I'd only heard once on this list about the XML entities trick.  Personally,
> I'd prefer that one like that if I were creating anything large enough to
> warrant breaking the configuration down into multiple files/modules. :)

Entities are a standard XML thing. Here is another trick, though it is
a bit offtopic. Say, you want to output data to XML. And you have a
regular structure of XML elements, like this:

  <element>some stuff</element>
  <element>some more stuff</element>
  <element>event some more stuff</element>

You can do that in an XML file, but you cannot simply append to the
file, because you always need to close <body> to keep XML well-formed.
So, here is what you do:


<?xml version="1.0"?>
<!ENTITY content SYSTEM "content.xml">

<RECORD>Some stuff</RECORD>
<RECORD>Some more stuff</RECORD>
<RECORD>And some more stuff</RECORD>

Voila. Now you can append <RECORD> elements to the content.xml file,
and resulting document will stay well-formed.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message