struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "bphillips@ku.edu" <bphill...@ku.edu>
Subject Possible Bug When Using default-action-ref?
Date Thu, 16 Jan 2014 13:45:07 GMT
I'm working on JIRA issue https://issues.apache.org/jira/browse/WW-4259.  A
user reported that the action attribute of the form tag rendered by the
s:from tag included a duplicate amp (e.g. <form id="testform"
name="testform"
action="/formtest/TestPage.action?field1=111&amp;amp;field2=222"
method="post">

At first I could not duplicate the problem the user reported.

Then the user provided a Maven example project and running that project I
could duplicate the problem.

But I was wondering why I could not duplicate the problem in my own example
project.

I finally figured out that the user's project included a default-action-ref
statement in his struts.xml when mine did not.  Adding a default-action-ref
to my example enabled me to duplicate the user's problem.

What is strange is if you leave out the default-action-ref statement in the
struts.xml the s:form tag is rendered as <form id="testform" name="testform"
action="TestPage.action" method="post">

but with the default-action-ref statement in struts.xml the s:form tag is
rendered as <form id="testform" name="testform"
action="/formtest/TestPage.action?field1=111&amp;amp;field2=222"
method="post">

Anyone have some ideas of why the default-action-ref statement would cause
such as difference and if it should cause such a difference?

The example project submitted by the user is attached to the JIRA ticket. 
It may be helpful to read the comments int he JIRA ticket.

Thanks for the help.  I'm still new to the Struts 2 source code so if you
could point me in the right direction that would be great.

Bruce






--
View this message in context: http://struts.1045723.n5.nabble.com/Possible-Bug-When-Using-default-action-ref-tp5715093.html
Sent from the Struts - Dev mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Mime
View raw message