File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes Catching JSP NullPointerException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Catching JSP NullPointerException" Watch "Catching JSP NullPointerException" New topic
Author

Catching JSP NullPointerException

Sivaraman Lakshmanan
Ranch Hand

Joined: Aug 02, 2003
Posts: 231
Hi All,
we are using Tomact as the servlet engine in production. There some issues like in JSP page we may get a NullPointerException which will just show as a blank page. If we have a try catch block in the JSP page we will know where the exception is thrown. If we don't have try catch block, will the server anywhere in the logs puts the error trace? Is there any best way to find where in JSP the exception is thrown.

Thanks in Advance.


Regards,
Sivaraman.L
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14074
    
  16

You could add a JSP error page, which is a JSP that you configure in your web application deployment descriptor (web.xml) to be called whenever an exception occurs.

See this: JavaServer Pages (JSP) Error Pages and Preventing Repeated Operations


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Catching JSP NullPointerException
 
Similar Threads
exceptions
Doubt with Dan's Mock exam - Flow Control & Exception Handling Q7
Exception
Round up question #132
Can we use finaly block to catch exceptions without using catch block?