The solution from Mike works. My variables in struts.xml that were getting
replaced were ${provider.id} and ${id}.  It was weird because something like
${contact.provider.id} would not get replaced.

How can I look at what is replaced with filter=true in the process-resources
goal?

-D



Mike Horwitz wrote:
> 
> You can add multiple resource sections in your pom. The trick is that you
> want the struts.xml in a resource (so that it gets copied) but one with
> the
> filter parameter turned off. As an example (this is untested, so might
> need
> a bit of tweaking):
> 
>         <resources>
>             <resource>
>                 <directory>src/main/resources</directory>
>                 <excludes>
>                     ...
>                     <exclude>struts.xml</exclude>
>                 </excludes>
>                 <filtering>true</filtering>
>             </resource>
>             <resource>
>                 <directory>src/main/resources</directory>
>                 <includes>
>                     <include>struts.xml</include>
>                 </includes>
>                 <filtering>false</filtering>
>             </resource>
>         </resources>
> 
> 
> Mike.
> 
> 
> On 6/22/07, sarat.pediredla <[EMAIL PROTECTED]> wrote:
>>
>>
>> Anyone with an idea of how to do this? I have tried changing everything
>> that
>> remotely references struts.xml but it does not seem to work.
>>
>> if I ask <resources> to exclude struts.xml completely, then my target
>> doesnt
>> have a struts.xml which is a pain.
>>
>> How do I ask the build process not to replace my lovely ${issue.id} in
>> pom.xml with com.mycompany.myobject:myproject:myproject.war ?
>>
>>
>> mraible wrote:
>> >
>> > The variable might be getting replaced as part of the build process.
>> > Look at target/yourapp-version/WEB-INF/classes/struts.xml to see if
>> > it's getting replaced at build time. If so, exclude it in your pom.xml
>> > in the resources section.
>> >
>> > Matt
>> >
>> > On 6/21/07, sarat.pediredla <[EMAIL PROTECTED]> wrote:
>> >>
>> >> I am using a redirect-action in my Appfuse 2.0 M5 app with Struts 2.
>> >>
>> >> Here is my struts.xml file
>> >>
>> >> <action name="save" class="myAction" method="save">
>> >>             <result name="cancel" type="redirect-action">list</result>
>> >>             <result name="success"
>> type="redirect-action">list</result>
>> >>             <result name="input" type="redirect-action">
>> >>                 edit
>> >>                 true
>> >>                 ${object.id}
>> >>             </result>
>> >> </action>
>> >>
>> >> But when I execute this, the browser gets re-directed to a page like
>> >> below,
>> >>
>> >>
>> http://localhost:8080/edit.html?id=com.mycompany.something%3Amyproject%3Awar
>> >>
>> >> Is this an issue with appfuse or with my struts configuration? The
>> code
>> >> was
>> >> copied as is from a Struts 2 tutorial except for the actual semantics.
>> >>
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/Redirect-Action-doesn%27t-like-%3Cparam%3E-in-Struts-2-archetype-tf3958395s2369.html#a11231981
>> >> Sent from the AppFuse - User mailing list archive at Nabble.com.
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >> For additional commands, e-mail: [EMAIL PROTECTED]
>> >>
>> >>
>> >
>> >
>> > --
>> > http://raibledesigns.com
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> > For additional commands, e-mail: [EMAIL PROTECTED]
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Redirect-Action-doesn%27t-like-%3Cparam%3E-in-Struts-2-archetype-tf3958395s2369.html#a11247069
>> Sent from the AppFuse - User mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Redirect-Action-doesn%27t-like-%3Cparam%3E-in-Struts-2-archetype-tf3958395s2369.html#a12581241
Sent from the AppFuse - User mailing list archive at Nabble.com.

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

Reply via email to