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
User Name
Password

Reply
 
LinkBack Thread Tools Display Modes
Old 03-20-2006, 07: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, 01:21 AM   #2 (permalink)
Belisarius
Java fanboy
 
Belisarius's Avatar
 
Join Date: Aug 2003
Posts: 1,114
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


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

vB 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 01:35 AM
mysql-tomcat-jsp connectivity problem tak2kuldeep Web/Application Servers ( Apache, Tomcat, IIS, JBoss, Websphere, etc... ) 3 05-16-2005 07:31 AM
JSP code problem j.gohel Java 7 04-15-2005 02:07 PM
jsp: display class? sde Java 1 10-19-2004 01:02 PM


All times are GMT -8. The time now is 07:17 PM.


Powered by vBulletin Version 3.6.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2006, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting
Open Circle