I think the problem may be trivial..you have given the hidden field with name="hidSubmit"..ok..but in your servlet u access as "HIDSUBMIT"....may be u shud access as request.getParameter("ExportConstant.hidSubmit)..
Originally posted by Srinivas Ivaturi: Anyway I am unahppy .
While using JSP, lot of people get confuse about the part that will be executed on server and the part that will be executed on client i.e. browser(I.E., Netscape, Mozila etc.)
req.setAttribute(obj, obj) is executed on the server and once a response is sent to browser, scope of "request" object is over as it has executed the request.
When you submit your html page (Note: not a jsp) from browser to your Servlet, that is a new "request". New request does not know anything about previous request as HTTP is stateless protocol. So servlet cant retrieve the attribute that you have set in JSP.
I will recommend you to read more about HTTP being stateless and the methods of maintaining session in HTTP.
Servlet provides a method to maintain session on server. You can use HttpSession object to set attribute.
But before you use session object, better know why you are using it and how it maintains session.
All The Best.
subject: request.setAttribute and getAttribute problem