Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums

Go Back   Code Forums > Application and Web Development > Java

Reply
 
LinkBack Thread Tools Display Modes
Old 03-20-2006, 08:12 PM   #1 (permalink)
j.gohel
Code Monkey
 
Join Date: Apr 2005
Posts: 68
j.gohel is on a distinguished road
JSP Error page not getting displayed

Hi i have designed one exception class.
What the process follows is:

I am clicking a button from my welcome.jsp page to get connection to the database which hits my makeConnection servlet.The makeConnection servlet calls getConnection() method of some another class .In that other class i m forcefully making runtime error so that i can display my jsp error page.But i am getting the conventional jsp error page provide by Tomcat .

So how to make my error page display if the exception is generated when my servlet takes use of some model class which(the model class) generates the exception???

Thanks,
Jignesh
j.gohel is offline   Reply With Quote
Old 03-21-2006, 02:21 AM   #2 (permalink)
Belisarius
Java fanboy
 
Belisarius's Avatar
 
Join Date: Aug 2003
Posts: 1,175
Belisarius is on a distinguished road
It's been a while since I worked with custom JSP error pages, and I don't really remember how to do it. I'm pretty sure it can be defined in the Tomcat configuration files, that if you encounter X exception, go to this page. Alternately, you can catch the exception yourself and redirect the user to a custom error page (response.sendRedirect() or something along those lines).
__________________
GitS
Belisarius is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
A Jsp plus Javascript query j.gohel Java 3 03-17-2006 02:35 AM
JSP code problem j.gohel Java 7 04-15-2005 03:07 PM
jsp: display class? sde Java 1 10-19-2004 02:02 PM


All times are GMT -8. The time now is 12:16 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0 RC8 ©2007, Crawlability, Inc.





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting