hi all, i have written a HTML forms body in doGet method of a servlet and trying to retriev form element values in doPost method of the same servlet.my problem is that some times i get the values by using request.getParameter but many times it just returns null although value has been entered in the form elements. can anybody pls tell me its reason and possible solution? regards khushi
thanks for ur reply ben, but as u can see in the code that i've posted,i am using String field=item.getFieldName(); String value=item.getString();
to get name of field and its value,these functions are from fileupload class only. i am facing a very strange problem...sometimes i get values and at other time i get null.i am neither able to find out the reason nor solve the problem.
however the file uploading part gets implemented succesfully in any case. pls help me out,its pretty urgent.
I've never seen this problem. If you have a access to a packet sniffer like tcpflow or Ethereal, it might help to look at what, exactly, is being sent up from the browser.
BTW: If you wrap your code in code tags (there is a code button on the page) your indenting will be preserved, making your code much easier to read. This usually means more people will read it and try to help.