POST data sent by Spring MVC is null on IE8?

Up vote 0 down vote favorite share g+ share fb share tw.

I have two text fields (pageField1) and pageField2) in Spring MVC where an user can input in page numbers. The javascript code retrieves the values in these textfields and sends as POST data to the controller. The code for retreiving the values and sending as POST data in javascript is exactly the same for both fields.

In the Controller, I use request. GetParameter("value") to retrieve the POST data. On Firefox and Chrome, values for both pageField1 and pageField2 are retrieved fine.

On IE8, request. GetParameter("value") returns null for pageField1 but the correct value for pageField2. This is really baffling, and I am stumped.

I put an alert just before Spring MVC sends the POST data to the controller. The values are exactly the same for FireFox and IE, but when retrieved on the controller, its null on IE. Any input would be great!

I can post snippet of the code if needed. Thanks! Java spring-mvc link|improve this question asked Apr 7 '11 at 16:36appbee1.

Lots of possible things going wrong. Can you try submitting your form without javascript? You could try httptea (httptea.sourceforge.net) to view all the header information being sent from the different browsers.

My gut feeling is that the javascript you're using to post your form is not setting the parameter correctly for IE 8 and therefore the parameter is not even making it to your server. – hooknc Apr 7 '11 at 16:48 I agree with @hooknc . Please post the javascript code which does the POST request.

It cant be debugged without the code. – Aravindan R Apr 7 '11 at 17:49.

Will try using HTTPtea. I already downloaded it, just have to configure it now. Thanks!

Here is my JavaScript code: Here is the JavaScript code: functionPageField1(event){ if (event == null || event. KeyCode == 13) { var domain = document. GetElementById('domainTextField').

Value; var nameToFindExcl = document. GetElementById('searchObjectsExclTextField'). Value; var pageNumberExcl = document.

GetElementById('pageNumberExclTextField'). Value; var pageCountExcl = document. GetElementById('pageCountExclTextField').

Value; var nameToFindIncl = document. GetElementById('searchObjectsInclTextField'). Value; var pageNumberIncl = document.

GetElementById('pageNumberInclTextField'). Value; if (!isValidInput(pageNumberExcl,pageNumberIncl)){ return; } alert("/sysmgr/domains/viewDomainObjects. Spr?

Domain=" + domain + "&nameToFindExcl=" + nameToFindExcl + "&pageNumberExcl=" + pageNumberExcl + "&nameToFindIncl=" + nameToFindIncl + "&pageNumberIncl=" + pageNumberIncl); /* Its the pageNumberExcl that is null in the controller, where as all other values are fine. In the above alert, I see the correct value for pageNumberExcl, but its null when I retreive it in the controller. */ window.

Location="/sysmgr/domains/viewDomainObjects. Spr? Domain=" + domain + "&nameToFindExcl=" + nameToFindExcl + "&pageNumberExcl=" + pageNumberExcl + "&nameToFindIncl=" + nameToFindIncl + "&pageNumberIncl=" + pageNumberIncl; } } //This is the snippet of the html code that defines the pageNumberExcl Field.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions