I get this error:
HTTP Status 500 -
type Exception report
message
descriptionThe server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: java.lang.NullPointerException
root cause
java.lang.NullPointerException
note The full stack traces of the exception and its root causes are available in the GlassFish Server Open Source Edition 3.1-b24 logs.
GlassFish Server Open Source Edition 3.1-b24
when I try to forward from a jsp to another jsp or when I forward in a servlet… The thing is that Y modify some datils from my page and I want to go back to the login-page and log in again to see if the update was successful !… Any ideas on this error ?… Thankx
A
NullPointerExceptionis a rather trivial exception and has actually nothing to do with JSP/Servlets, but with basic Java in general (look, it’s an exception ofjava.langpackage, not ofjavax.servletpackage). It just means that some object isnullwhile your code is trying to access/invoke it using the period.operator.Something like:
The 1st line of the stacktrace tells you in detail all about the class name, method name and line number where it occurred.
Fixing it is relatively easy. Just make sure that it’s not
nullor bypass the access altogether. You should rather concentrate on why it isnulland/or why your code is trying to deal withnull.