Form not submitting, after migration

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Form not submitting, after migration

sharmila thota
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Form not submitting, after migration

adam brin
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 <[hidden email]> 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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Form not submitting, after migration

Lukasz Lenart
In reply to this post by sharmila thota
2017-08-01 15:42 GMT+02:00 sharmila thota <[hidden email]>:
> <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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Form not submitting, after migration

sharmila thota
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 <[hidden email]> wrote:
>
> 2017-08-01 15:42 GMT+02:00 sharmila thota <[hidden email]>:
>> <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: [hidden email]
> For additional commands, e-mail: [hidden email]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Form not submitting, after migration

sharmila thota
In reply to this post by adam brin
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 <[hidden email]>
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 <[hidden email]> 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: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Form not submitting, after migration

Lukasz Lenart
In reply to this post by sharmila thota
2017-08-01 16:46 GMT+02:00 sharmila thota <[hidden email]>:
> 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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Form not submitting, after migration

sharmila thota
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 <[hidden email]>
wrote:

> 2017-08-01 16:46 GMT+02:00 sharmila thota <[hidden email]>:
> > 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: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Form not submitting, after migration

Lukasz Lenart
In reply to this post by sharmila thota
2017-08-01 15:42 GMT+02:00 sharmila thota <[hidden email]>:
>              <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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Form not submitting, after migration

sharmila thota
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 <[hidden email]>
wrote:

> 2017-08-01 15:42 GMT+02:00 sharmila thota <[hidden email]>:
> >              <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: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Form not submitting, after migration

Lukasz Lenart
Could you post a generated html?

2017-08-01 22:21 GMT+02:00 sharmila thota <[hidden email]>:

> 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 <[hidden email]>
> wrote:
>
>> 2017-08-01 15:42 GMT+02:00 sharmila thota <[hidden email]>:
>> >              <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: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Form not submitting, after migration

Lukasz Lenart
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 <[hidden email]>:

> Could you post a generated html?
>
> 2017-08-01 22:21 GMT+02:00 sharmila thota <[hidden email]>:
>> 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 <[hidden email]>
>> wrote:
>>
>>> 2017-08-01 15:42 GMT+02:00 sharmila thota <[hidden email]>:
>>> >              <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: [hidden email]
>>> For additional commands, e-mail: [hidden email]
>>>
>>>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Form not submitting, after migration

sharmila thota
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 <[hidden email]> 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 <[hidden email]>:
>> Could you post a generated html?
>>
>> 2017-08-01 22:21 GMT+02:00 sharmila thota <[hidden email]>:
>>> 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 <[hidden email]>
>>> wrote:
>>>
>>>> 2017-08-01 15:42 GMT+02:00 sharmila thota <[hidden email]>:
>>>>>             <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: [hidden email]
>>>> For additional commands, e-mail: [hidden email]
>>>>
>>>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Form not submitting, after migration

Lukasz Lenart
2017-08-03 19:04 GMT+02:00 sharmila thota <[hidden email]>:
> 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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Form not submitting, after migration

sharmila thota
Nope Lukas.
Thanks
Sharmila

Sent from my iPhone

> On Aug 4, 2017, at 2:25 AM, Lukasz Lenart <[hidden email]> wrote:
>
> 2017-08-03 19:04 GMT+02:00 sharmila thota <[hidden email]>:
>> 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: [hidden email]
> For additional commands, e-mail: [hidden email]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Loading...