File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes How to handle jsp runtime exceptions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "How to handle jsp runtime exceptions " Watch "How to handle jsp runtime exceptions " New topic
Author

How to handle jsp runtime exceptions

Ramesh Yakkala
Greenhorn

Joined: May 12, 2005
Posts: 5
Hi,

May I know how to handle the jsp runtime exceptions.

I knew one jsp as error page my including the isErrorPage='true' page attribute and provide the jsp as errorPage in other jsp's.

But my requirement,I am using the tiles frame work,which is logically forming the header,footer,body.

So if I give error jsp,it shows only error jsp with out header and footer,since I am not calling the tiles.

Is there a way to configure the jsp run time errors through the web.xml url patter?

or Is there a way to call the url pattern in jsp,when jsp run time exception throughs?

Thanks,
Ramesh Yakkala.
harshvardhan ojha
Ranch Hand

Joined: Jul 26, 2007
Posts: 157
    
    1

you can do something like

in your web.xml.
Ramesh Yakkala
Greenhorn

Joined: May 12, 2005
Posts: 5
harshvardhan ojha wrote:you can do something like

in your web.xml.


I am using the follwoing code in web.xml

<error-page>
<exception-type>java.lang.Throwable</exception-type>
<location>/error</location>
</error-page>

wouldn't handle it?

Thanks for the reply.
harshvardhan ojha
Ranch Hand

Joined: Jul 26, 2007
Posts: 157
    
    1

why throwable and not exception. ideally you would like to handle all exception conditions but not errors. isn't it?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to handle jsp runtime exceptions
 
Similar Threads
Struts passing data across tiles
How to handle exceptions occured in tiles in struts 1.2
Design choice for dispatching request to view
Tiles insert throwing a Null exception
Null error in "Menu" Tile