This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
1. "form.html" in which we enter the user name and click submit 2. "cookietest.java" - servlet which adds a cookie and transfer the control to a jsp which again takes to another servlet named "checkcookie.java".in "checkcookie" we retrieve the cookie.
The problem is in the cookietest,trying to use the request dispatcher.I had saved the "result.jsp" directly under tomcat/webapps
when I use this code
it gives me Null Pointer Exception
results in result.jsp not found.
I checked the parameter name,cookie name and the location of the file.I am unable to locate the problem.Please help.
Thank you very much.Vinal
Note: replaced Cookie with Kookie to post this topic
This "RequestDispatcher view=request.getRequestDispatcher("/result.jsp")" is being interpreted relative to the current context root. So, make sure your jsp is in the right place. As already suggested, try putting your jsp at the root of your wepapp.
Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley