I have a hidden variable in JSP and its value is hard coded as specified below. <input type="hidden" name="hidparam1" value="hidvalue1"> On click of a button in the JSP, the servlet(myservlet1) will be invoked. I am retriving a value in Servlet like String param1= request.getParameter("hidparam1"); Some times, the value for "hidparam1" is coming as null in the servlet. When I give System.out.println(request.getParameter("hidparam1")); I get null as output. Please help. This is really urgent. Thanks and Regards Sfs
deadliestofall, We don't have many rules at Javaranch, but our naming policy is one of them. We would like you to continue posting, but would you please change your display name first?. Thanks. You can change your display name here.
As far as I know, the only way you can get a null from getParameter is if the name does not exist in the form. This can be due to a difference in spelling - it is case sensitive. If this was my problem I would dump all of the parameters from the request to see what was really being tranmitted. You can use getParameterNames to get an Enumeration of all parameter names that are present. Bill
As I mentioned, most of the time, I do get the actual value. Its only in some cases that I don't. I'm using Weblogic 5.1. As I see from the weblogic docs, there is a parameter for reset time for 'Post' parameters and its defaulted to 30 secs. But I believe the null value appears though the response comes back in less that 30 secs. Can't seem to find out why or how this happens... Please help....