Hi All,
I am using JavaWebserver2.0 on Solaris.
I am facing a problem.
I have a few servlets and jsps.
Consider the following sequence
login.jsp ---> serv1 ----> ParmsMain.jsp
Whenever I restart my Javawebserver2.0 and start with the login.jsp
I get the following error:
The servlet named range.RangeServlet at the requested URL
http://cobra01:9085/servlet/range.RangeServlet
reported this exception: java.lang.NullPointerException. Please report this
to the administrator of the web server.
java.lang.NullPointerException at
com.sun.server.http.pagecompile.GenericPageCompileServlet.loadClass(GenericP
ageCompileServlet.java:517) at
com.sun.server.http.pagecompile.jsp.runtime.JspServlet.compileAndLoadServlet
(JspServlet.java:274) at
com.sun.server.http.pagecompile.jsp.runtime.JspServlet.processJspPage(JspSer
vlet.java:254) at
com.sun.server.http.pagecompile.jsp.runtime.JspServlet.service(JspServlet.ja
va:97) at javax.servlet.http.HttpServlet.service(HttpServlet.java:840) at
com.sun.server.ServletState.callService(ServletState.java:226) at
com.sun.server.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:202)
at
com.sun.server.http.HttpRequestDispatcherImpl.forward(HttpRequestDispatcherI
mpl.java:249) at range.RangeServlet.addRange(RangeServlet.java:60) at
range.RangeServlet.doGet RangeServlet.java:38) at .........
........
My servlet has the following code :
if ( func == 1)
getServletContext().getRequestDispatcher("/ParmsMain.jsp").forward(req,res);
The jsp needs to be recompiled. Then it works fine.
But If I replace this code snippet with
res.sendRedirect("/ParmsMain.jsp")
I no longer get the problem. But in this case the values from the login.jsp
are not passed to the ParmsMain.jsp.
Could somebody solve this problem.
Thanks,
JS
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets