Here is a snipit of my struts-config.skeleton.xml:
<form-beans>
  @core.formbean
  @campaign.formbean
  @promotion.formbean
  @promotionTypes.pantryLoading.formbean
</form-beans>
<action-mappings>
  @core.action
  @campaign.action
  @promotion.action
  @promotionTypes.pantryLoading.action
</action-mappings>

Here is the snipit from the build:
Notes: there may be a better way to do this, this was quick and dirty
Also, each individual developer has three files:
struts-action.xml
struts-formbean.xml
validation.xml

I use struts-action for the actions, struts-formbean for the formbeans, and
I also build the validation file so that is what validation.xml is for....

 <target name="struts.config.build">
  <echo message="Building struts-config.xml"/>
  <delete file="${j2ee.struts}"/>  <!-- struts-config.xml -->
  <!-- build the struts-config.xml -->
  <copy file="${j2ee.struts.skeleton}"
   tofile="${j2ee.struts}"/>

  <loadfile property="struts.config.core.action"
   srcFile="${src.core}/${j2ee.struts.action}"/>
  <loadfile property="struts.config.core.formbean"
   srcFile="${src.core}/${j2ee.struts.formbean}"/>
  <replace file="${j2ee.struts}"
   token="@core.action"
   value="${struts.config.core.action}"/>
  <replace file="${j2ee.struts}"
   token="@core.formbean"
   value="${struts.config.core.formbean}"/>

You should be able to get this gist from that....

Works very well....

--
Sloan

----- Original Message -----
From: "Dan Allen" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, March 21, 2003 9:31 AM
Subject: Re: struts-config.xml


> Sloan Seaman ([EMAIL PROTECTED]) wrote:
>
> > You can also have imultiple files and then have ANT use a skeleton
> > struts-config.xml file to build the final file.
> >
> > Just use variable replacement in ANT to insert all the seperate files
into
> > one master file (that is how we do it)
>
> Great idea!  Who cares what the deployed struts-config.xml file
> looks like after all.  Man, maybe struts developers could have saved
> the time and just relied on ant.  Oh well, guess options are good.
>
> Mind you code post?  Okay, I won't beat around the bush, can you
> post that snippet from your ant build file?  I would be most
> appreciative!
>
> Dan
>
> --
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> Daniel Allen, <[EMAIL PROTECTED]>
> http://www.mojavelinux.com/
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> Real programmers just hate to get up in the morning, and
> contrary to Ordinary People, they're in better shape as
> it gets closer to nighttime.
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to