0

I have a java webapp using the Tapestry5 framework where I'm seeing exceptions in my logs that look something like this,

Forms require that the request method be POST and that the t:formdata query parameter have values

When I spoke to the user group, it was believed that there is some sort of issue where the browser is turning a form post into a get request. I've been seeing this happen with legacy versions of ie and modern android devices using later versions of chrome.

My question is what would cause this type of behavior?

Edit:

Example form

<form id="sortForm" method="post" action="/product/index.sortform" data-validate="submit">

I'd also like to rule out bot activity do to the fact I see this happening on some of my apps that sit behind firewalls without any bot access.

Code Junkie
  • 7,602
  • 26
  • 79
  • 141
  • possible duplicate of [Android 4.0 ICS turning HttpURLConnection GET requests into POST requests](http://stackoverflow.com/questions/8187188/android-4-0-ics-turning-httpurlconnection-get-requests-into-post-requests) – Refilon Feb 20 '15 at 15:46
  • They seem to be having an issue with gets being turned into post and I'm having the opposite problem where post are being turned into gets. – Code Junkie Feb 20 '15 at 16:03

1 Answers1

0

The problem caused by address bar completion of all browsers and the solution is that, please add autocomplete="false" to all of your forms.

Edit 1:

If you do not use action type, it works like "GET" method. Be sure that you added the action "method" attribute value of the form as "POST".

Edit 2:

Please check GET submits instead of POST ones. Tapestry

There was a major error emphasized at that link (jira) https://issues.apache.org/jira/browse/TAP5-2066 which is solved before.

Community
  • 1
  • 1
mrciga
  • 47
  • 8
  • I added an edit to my question containing my form post url. I'm not sure how autocomplete="false" will fix this. Could you provide a link to some documentation so I can read up on it? Thanks. – Code Junkie Feb 20 '15 at 16:13
  • Unfortunately that doesn't tell me anything I don't already know. I can say for sure this isn't bot activity. I have multiple apps where I see this happening and some of those are behind firewalls where bots have no access. – Code Junkie Feb 20 '15 at 16:33
  • Did you check the "tagName" attribute? They discussed something about conflict of the "tagName" attribute in the js and also the framework. – mrciga Feb 20 '15 at 16:38
  • Well I use 5.4 and that appears to be related to a zone in 3.6 which isn't being used here. The js from 5.3 to 5.4 has been completely rewritten, so I don't suspect that to be the issue. This also appears to be very random, I have never been able to reproduce it on my own. – Code Junkie Feb 20 '15 at 16:42