I have am facing an error in a JSP page. Could you please let me know what the problem is because it seems quite all right to me!
I get this when i another jsp page on the server and from that JSP page the request comes to a servlet from which the request is forwarded to this JSP page!
I have another small Query! Please help me in on this one! I would like you to see my web.xml file. I want a JSP page to forward the request to a servlet but I always get the error
web.xml:
My form tag consists of:
The problem is the request is not forwarded to the servlet from the JSP. Could you please let me know what to put in the "action" attribute of the form tag?
Your form action doesn't need to have the full path of the requested servlet starting from the protocol. You can write /EnvironmentDetails/EnvDetailsServlet only. And as far as the error goes, did you override the doPost method in your servlet. It would be helpful if you showed us the the servlet code...
Smitha H Rao wrote:You might get exception if your cpDetails is null.
Try something like this.
<%= (cpDetails!=null?cpDetails.get("CP_NAME"):"null") %>
I would change your controller so cpDetails is guaranteed to be non-null. I.e., it should always reference a Map, although the Map could be empty.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.