You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by sharmila thota <t....@gmail.com> on 2017/08/01 13:42:21 UTC
Form not submitting, after migration
Hello,
Good Morning!
We migrated our application recently to
struts 2.5.10.1, now I see a problem with one of the JSP which is not
submitting the form (not reaching action class). Please help me out.
*here is my struts.xml configuration for the same:*
<action name="correctionapplyFunding"
class="com.fund.action.CorrectionsAction" method="applyFund">
<result name="reFunding">/WEB-INF/jsps/q6/Q6New.jsp</result>
</action>
*Action class method:*
public String applyFund() throws Exception {
.........
......
return "refunding";
}
*jsp coding:*
<s:submit name="submit" id="applyFundingButton"
value="ReApplyFunding"
class="pure-button pure-button-primary"
action="correctionapplyFunding">
</s:submit>
Thanks
Sharmila
Re: Form not submitting, after migration
Posted by sharmila thota <t....@gmail.com>.
Hello Adam,
Here is what I have in my jsp:
contentType="text/html;charset=windows-1252"
thanks
Sharmila
On Tue, Aug 1, 2017 at 10:15 AM, Adam Brin <ab...@digitalantiquity.org>
wrote:
> What encoding type are you using? it’s possible that part of the issue is
> that you’re submitting a multi-part form and it’s being caught up by an
> existing bug [WW-4818]
>
> - adam
> --
> _________________________________________________________
> Adam Brin
> Director of Technology, Digital Antiquity
> 480.965.1278
>
> > On Aug 1, 2017, at 6:42 AM, sharmila thota <t....@gmail.com> wrote:
> >
> > Hello,
> >
> > Good Morning!
> > We migrated our application recently to
> > struts 2.5.10.1, now I see a problem with one of the JSP which is not
> > submitting the form (not reaching action class). Please help me out.
> >
> > *here is my struts.xml configuration for the same:*
> >
> > <action name="correctionapplyFunding"
> > class="com.fund.action.CorrectionsAction" method="applyFund">
> > <result name="reFunding">/WEB-INF/jsps/q6/Q6New.jsp</result>
> > </action>
> >
> >
> > *Action class method:*
> > public String applyFund() throws Exception {
> > .........
> > ......
> > return "refunding";
> > }
> >
> > *jsp coding:*
> > <s:submit name="submit" id="applyFundingButton"
> > value="ReApplyFunding"
> > class="pure-button pure-button-primary"
> > action="correctionapplyFunding">
> > </s:submit>
> >
> > Thanks
> > Sharmila
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
Re: Form not submitting, after migration
Posted by Adam Brin <ab...@digitalantiquity.org>.
What encoding type are you using? it’s possible that part of the issue is that you’re submitting a multi-part form and it’s being caught up by an existing bug [WW-4818]
- adam
--
_________________________________________________________
Adam Brin
Director of Technology, Digital Antiquity
480.965.1278
> On Aug 1, 2017, at 6:42 AM, sharmila thota <t....@gmail.com> wrote:
>
> Hello,
>
> Good Morning!
> We migrated our application recently to
> struts 2.5.10.1, now I see a problem with one of the JSP which is not
> submitting the form (not reaching action class). Please help me out.
>
> *here is my struts.xml configuration for the same:*
>
> <action name="correctionapplyFunding"
> class="com.fund.action.CorrectionsAction" method="applyFund">
> <result name="reFunding">/WEB-INF/jsps/q6/Q6New.jsp</result>
> </action>
>
>
> *Action class method:*
> public String applyFund() throws Exception {
> .........
> ......
> return "refunding";
> }
>
> *jsp coding:*
> <s:submit name="submit" id="applyFundingButton"
> value="ReApplyFunding"
> class="pure-button pure-button-primary"
> action="correctionapplyFunding">
> </s:submit>
>
> Thanks
> Sharmila
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Form not submitting, after migration
Posted by sharmila thota <t....@gmail.com>.
Nope Lukas.
Thanks
Sharmila
Sent from my iPhone
> On Aug 4, 2017, at 2:25 AM, Lukasz Lenart <lu...@apache.org> wrote:
>
> 2017-08-03 19:04 GMT+02:00 sharmila thota <t....@gmail.com>:
>> We migrated from 2.3.29 to 2.5.10.1
>> One good news is, I was able to resolve this issue by adding annotation @Skipvalidation to my action method.
>
> wOOt! Did you recently add a XML validation for this action?
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Form not submitting, after migration
Posted by Lukasz Lenart <lu...@apache.org>.
2017-08-03 19:04 GMT+02:00 sharmila thota <t....@gmail.com>:
> We migrated from 2.3.29 to 2.5.10.1
> One good news is, I was able to resolve this issue by adding annotation @Skipvalidation to my action method.
wOOt! Did you recently add a XML validation for this action?
Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Form not submitting, after migration
Posted by sharmila thota <t....@gmail.com>.
Hello Lukas,
We migrated from 2.3.29 to 2.5.10.1
One good news is, I was able to resolve this issue by adding annotation @Skipvalidation to my action method.
Thanks for the Support Lukas!
Thanks
Sharmila
Sent from my iPhone
> On Aug 3, 2017, at 2:05 AM, Lukasz Lenart <lu...@apache.org> wrote:
>
> What was the version you have migrated from?
>
> Maybe this is your case
> https://struts.apache.org/docs/s2-018.html
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> 2017-08-02 10:53 GMT+02:00 Lukasz Lenart <lu...@apache.org>:
>> Could you post a generated html?
>>
>> 2017-08-01 22:21 GMT+02:00 sharmila thota <t....@gmail.com>:
>>> Hello Lukas,
>>>
>>> That was just typo in email. But my code is having correctly.
>>> Also I tried adding one more button on jsp and tried with click event. that
>>> too did not work.
>>> Here I am attaching the code:
>>>
>>> *action method: *
>>> public String newMethod() throws Exception {
>>> System.out.println("hello.....");
>>> return "newPage";
>>> }
>>>
>>> *struts.xml:*
>>> <action name="correctionNew" class="com.fund.action.CorrectionsAction"
>>> method="newMethod">
>>> <result name="newPage">/WEB-INF/jsps/q6/Q6New.jsp</result>
>>> </action>
>>>
>>> *jsp code :*
>>> <s:form namespace="/" id="correctionsReApplyFundId">
>>> <input type="button" class="pure-button pure-button-primary" id="newButton"
>>> value="New Button"/>
>>>
>>> $('#newButton').click(function () {
>>> alert("...submit b1..");
>>> $('#correctionsReApplyFundId').attr('action', '<s:url
>>> action="correctionNew"/>');
>>> alert("...submit b2..");
>>> $('#correctionsReApplyFundId').submit();
>>> alert("...submit b3..");
>>> });
>>>
>>> thanks
>>> Sharmila
>>>
>>> On Tue, Aug 1, 2017 at 3:00 PM, Lukasz Lenart <lu...@apache.org>
>>> wrote:
>>>
>>>> 2017-08-01 15:42 GMT+02:00 sharmila thota <t....@gmail.com>:
>>>>> <result name="reFunding">/WEB-INF/
>>>> jsps/q6/Q6New.jsp</result>
>>>>
>>>> this isn't the same result name as below
>>>>
>>>>> return "refunding";
>>>>
>>>>
>>>> Regards
>>>> --
>>>> Łukasz
>>>> + 48 606 323 122 http://www.lenart.org.pl/
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>>> For additional commands, e-mail: user-help@struts.apache.org
>>>>
>>>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Form not submitting, after migration
Posted by Lukasz Lenart <lu...@apache.org>.
What was the version you have migrated from?
Maybe this is your case
https://struts.apache.org/docs/s2-018.html
Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
2017-08-02 10:53 GMT+02:00 Lukasz Lenart <lu...@apache.org>:
> Could you post a generated html?
>
> 2017-08-01 22:21 GMT+02:00 sharmila thota <t....@gmail.com>:
>> Hello Lukas,
>>
>> That was just typo in email. But my code is having correctly.
>> Also I tried adding one more button on jsp and tried with click event. that
>> too did not work.
>> Here I am attaching the code:
>>
>> *action method: *
>> public String newMethod() throws Exception {
>> System.out.println("hello.....");
>> return "newPage";
>> }
>>
>> *struts.xml:*
>> <action name="correctionNew" class="com.fund.action.CorrectionsAction"
>> method="newMethod">
>> <result name="newPage">/WEB-INF/jsps/q6/Q6New.jsp</result>
>> </action>
>>
>> *jsp code :*
>> <s:form namespace="/" id="correctionsReApplyFundId">
>> <input type="button" class="pure-button pure-button-primary" id="newButton"
>> value="New Button"/>
>>
>> $('#newButton').click(function () {
>> alert("...submit b1..");
>> $('#correctionsReApplyFundId').attr('action', '<s:url
>> action="correctionNew"/>');
>> alert("...submit b2..");
>> $('#correctionsReApplyFundId').submit();
>> alert("...submit b3..");
>> });
>>
>> thanks
>> Sharmila
>>
>> On Tue, Aug 1, 2017 at 3:00 PM, Lukasz Lenart <lu...@apache.org>
>> wrote:
>>
>>> 2017-08-01 15:42 GMT+02:00 sharmila thota <t....@gmail.com>:
>>> > <result name="reFunding">/WEB-INF/
>>> jsps/q6/Q6New.jsp</result>
>>>
>>> this isn't the same result name as below
>>>
>>> > return "refunding";
>>>
>>>
>>> Regards
>>> --
>>> Łukasz
>>> + 48 606 323 122 http://www.lenart.org.pl/
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: user-help@struts.apache.org
>>>
>>>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Form not submitting, after migration
Posted by Lukasz Lenart <lu...@apache.org>.
Could you post a generated html?
2017-08-01 22:21 GMT+02:00 sharmila thota <t....@gmail.com>:
> Hello Lukas,
>
> That was just typo in email. But my code is having correctly.
> Also I tried adding one more button on jsp and tried with click event. that
> too did not work.
> Here I am attaching the code:
>
> *action method: *
> public String newMethod() throws Exception {
> System.out.println("hello.....");
> return "newPage";
> }
>
> *struts.xml:*
> <action name="correctionNew" class="com.fund.action.CorrectionsAction"
> method="newMethod">
> <result name="newPage">/WEB-INF/jsps/q6/Q6New.jsp</result>
> </action>
>
> *jsp code :*
> <s:form namespace="/" id="correctionsReApplyFundId">
> <input type="button" class="pure-button pure-button-primary" id="newButton"
> value="New Button"/>
>
> $('#newButton').click(function () {
> alert("...submit b1..");
> $('#correctionsReApplyFundId').attr('action', '<s:url
> action="correctionNew"/>');
> alert("...submit b2..");
> $('#correctionsReApplyFundId').submit();
> alert("...submit b3..");
> });
>
> thanks
> Sharmila
>
> On Tue, Aug 1, 2017 at 3:00 PM, Lukasz Lenart <lu...@apache.org>
> wrote:
>
>> 2017-08-01 15:42 GMT+02:00 sharmila thota <t....@gmail.com>:
>> > <result name="reFunding">/WEB-INF/
>> jsps/q6/Q6New.jsp</result>
>>
>> this isn't the same result name as below
>>
>> > return "refunding";
>>
>>
>> Regards
>> --
>> Łukasz
>> + 48 606 323 122 http://www.lenart.org.pl/
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Form not submitting, after migration
Posted by sharmila thota <t....@gmail.com>.
Hello Lukas,
That was just typo in email. But my code is having correctly.
Also I tried adding one more button on jsp and tried with click event. that
too did not work.
Here I am attaching the code:
*action method: *
public String newMethod() throws Exception {
System.out.println("hello.....");
return "newPage";
}
*struts.xml:*
<action name="correctionNew" class="com.fund.action.CorrectionsAction"
method="newMethod">
<result name="newPage">/WEB-INF/jsps/q6/Q6New.jsp</result>
</action>
*jsp code :*
<s:form namespace="/" id="correctionsReApplyFundId">
<input type="button" class="pure-button pure-button-primary" id="newButton"
value="New Button"/>
$('#newButton').click(function () {
alert("...submit b1..");
$('#correctionsReApplyFundId').attr('action', '<s:url
action="correctionNew"/>');
alert("...submit b2..");
$('#correctionsReApplyFundId').submit();
alert("...submit b3..");
});
thanks
Sharmila
On Tue, Aug 1, 2017 at 3:00 PM, Lukasz Lenart <lu...@apache.org>
wrote:
> 2017-08-01 15:42 GMT+02:00 sharmila thota <t....@gmail.com>:
> > <result name="reFunding">/WEB-INF/
> jsps/q6/Q6New.jsp</result>
>
> this isn't the same result name as below
>
> > return "refunding";
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
Re: Form not submitting, after migration
Posted by Lukasz Lenart <lu...@apache.org>.
2017-08-01 15:42 GMT+02:00 sharmila thota <t....@gmail.com>:
> <result name="reFunding">/WEB-INF/jsps/q6/Q6New.jsp</result>
this isn't the same result name as below
> return "refunding";
Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Form not submitting, after migration
Posted by sharmila thota <t....@gmail.com>.
There is no element which has required="true" attribute. I just cross
checked in my code.
On Tue, Aug 1, 2017 at 2:43 PM, Lukasz Lenart <lu...@apache.org>
wrote:
> 2017-08-01 16:46 GMT+02:00 sharmila thota <t....@gmail.com>:
> > Hello Lukas,
> >
> > I tried removing action attribute from <s:submit> and added the same to
> <s:form>, still it doesn't work. Yes I do have another submit button for
> back navigation.
> >
> > Anyways, this type of functionality is working on other pages. Only this
> is bothering.
> > I tried thru client script using click event, that too did not work.
> >
> > Pls suggest me what else could be the issue.
>
> Maybe you have an attribute required="true" added somewhere? Please be
> aware that Struts 2.5.x is compliant with Html 5
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
Re: Form not submitting, after migration
Posted by Lukasz Lenart <lu...@apache.org>.
2017-08-01 16:46 GMT+02:00 sharmila thota <t....@gmail.com>:
> Hello Lukas,
>
> I tried removing action attribute from <s:submit> and added the same to <s:form>, still it doesn't work. Yes I do have another submit button for back navigation.
>
> Anyways, this type of functionality is working on other pages. Only this is bothering.
> I tried thru client script using click event, that too did not work.
>
> Pls suggest me what else could be the issue.
Maybe you have an attribute required="true" added somewhere? Please be
aware that Struts 2.5.x is compliant with Html 5
Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Form not submitting, after migration
Posted by sharmila thota <t....@gmail.com>.
Hello Lukas,
I tried removing action attribute from <s:submit> and added the same to <s:form>, still it doesn't work. Yes I do have another submit button for back navigation.
Anyways, this type of functionality is working on other pages. Only this is bothering.
I tried thru client script using click event, that too did not work.
Pls suggest me what else could be the issue.
Thanks
Sharmila
Sent from my iPhone
> On Aug 1, 2017, at 10:20 AM, Lukasz Lenart <lu...@apache.org> wrote:
>
> 2017-08-01 15:42 GMT+02:00 sharmila thota <t....@gmail.com>:
>> <s:submit name="submit" id="applyFundingButton"
>> value="ReApplyFunding"
>> class="pure-button pure-button-primary"
>> action="correctionapplyFunding">
>> </s:submit>
>
> You are using DMI which is disabled by default and I would keep it
> disabled. If you are using only a one submit button please remove the
> "action" attribute from the <s:submit/> and use it on <s:form>
> instead.
>
> http://struts.apache.org/core-developers/action-configuration.html#dynamic-method-invocation
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Form not submitting, after migration
Posted by Lukasz Lenart <lu...@apache.org>.
2017-08-01 15:42 GMT+02:00 sharmila thota <t....@gmail.com>:
> <s:submit name="submit" id="applyFundingButton"
> value="ReApplyFunding"
> class="pure-button pure-button-primary"
> action="correctionapplyFunding">
> </s:submit>
You are using DMI which is disabled by default and I would keep it
disabled. If you are using only a one submit button please remove the
"action" attribute from the <s:submit/> and use it on <s:form>
instead.
http://struts.apache.org/core-developers/action-configuration.html#dynamic-method-invocation
Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org