aspose file tools*
The moose likes Servlets and the fly likes exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "exception" Watch "exception" New topic
Author

exception

archana tiwari
Ranch Hand

Joined: Mar 15, 2012
Posts: 44

How to remove this exception


type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

java.lang.NullPointerException
LoginExample.Generatepdf.doPost(Generatepdf.java:125)
LoginExample.Generatepdf.doGet(Generatepdf.java:30)
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


note The full stack trace of the root cause is available in the Apache Tomcat/6.0.32 logs.
Neeraj Dhiman
Ranch Hand

Joined: Dec 19, 2011
Posts: 63

i think, this excepting occur if there is null in your jsp. not exactly. check your jsp for this.
hope this will help.


Correct Me if i am wrong
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10523
    
    9

archana tiwari wrote:
How to remove this exception


type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

java.lang.NullPointerException
LoginExample.Generatepdf.doPost(Generatepdf.java:125)
LoginExample.Generatepdf.doGet(Generatepdf.java:30)
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


note The full stack trace of the root cause is available in the Apache Tomcat/6.0.32 logs.


You can "remove this exception" by ensuring you are not invoking a method on null references. That is what the stack trace essentially means.
So what do you have on Generatepdf.java:125


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Manjunath Gajula
Greenhorn

Joined: Dec 21, 2011
Posts: 12
Put try catch and see while executing what piece of code, it is throwing null pointer.
<%try{
%> your JSP code should come here.
<%}catch(Exception e) {
%>
<%e.printStackTrace();%>

Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
Note that by using GET and POST interchangeably you're violating the HTTP specification. What's more, a login -which presumably involves sending a password- should never be done over GET.

Manjunath Gajula wrote:your JSP code should come here.

It's servlet code, not JSP code, as the stack trace shows.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: exception