954,554 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Servlet does not receive all post data

I have the following problem with a servlet in production on the Internet. I am using POST in a servlet to send the data to the servlet. I see in the log from the servlet that in rare cases the post parameters received in the servlet are null, and when I try to read the values I get a null value
(request.getParameter("data") returns null).

I have managed to recreate this problem in one specific browser, IE 6.0.2800.1106CO, SP1, on Windows NT. If I use "Back" in the browser and try again, it doesn't return a null value.

Do you have any idea how can I solve this problem?

Thanks

Julie444
Newbie Poster
1 post since Jul 2005
Reputation Points: 10
Solved Threads: 0
 
I have the following problem with a servlet in production on the Internet. I am using POST in a servlet to send the data to the servlet. I see in the log from the servlet that in rare cases the post parameters received in the servlet are null, and when I try to read the values I get a null value (request.getParameter("data") returns null). I have managed to recreate this problem in one specific browser, IE 6.0.2800.1106CO, SP1, on Windows NT. If I use "Back" in the browser and try again, it doesn't return a null value. Do you have any idea how can I solve this problem? Thanks



Did anyone ever find a solution to this problem?

monkeyMojo
Newbie Poster
3 posts since May 2006
Reputation Points: 10
Solved Threads: 0
 
Did anyone ever find a solution to this problem?

Could you post your code?

aniseed
Posting Whiz
359 posts since Apr 2006
Reputation Points: 48
Solved Threads: 7
 
Could you post your code?



I cannot post the actual code due to confidentiality agreements but it's very simple.. It happens spuratically on all servlets. Something as simple as request.getParameter("parameter_name") inside of the doPost methods. Randomly the server does not get any of the parameters, at least they come up with null values.

We have not been able to reproduce this at all, the client runs anything from IE5.x-IE6.x..

The post is being done mainly by AJAX callls using the XHConn library.

monkeyMojo
Newbie Poster
3 posts since May 2006
Reputation Points: 10
Solved Threads: 0
 

I am not asking you to post the complete code, but some snippets might be helpful in helping you.

Since you mentioned AJAX, is the request being handled asynchronously?

aniseed
Posting Whiz
359 posts since Apr 2006
Reputation Points: 48
Solved Threads: 7
 

Yes, its an asyncronous post. Its simply looking up data in hidden fields, escaping them, and doing an http post to the servlet. This works perfect in all test environments but I would say that 1% of the userbase experiences this glitch.

monkeyMojo
Newbie Poster
3 posts since May 2006
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You