Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to handle jsp runtime exceptions

 
Ramesh Yakkala
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 157
1
Android Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you can do something like

in your web.xml.
 
Ramesh Yakkala
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 157
1
Android Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
why throwable and not exception. ideally you would like to handle all exception conditions but not errors. isn't it?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic