This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JSP and the fly likes Error page problem 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 » Java » JSP
Bookmark "Error page problem" Watch "Error page problem" New topic
Author

Error page problem

A Kumar
Ranch Hand

Joined: Jul 04, 2004
Posts: 979
Hi,

I have a problem..I have a jsp where i am generating an exception..

i tried generating a customexception also..

But in all these cases..it is showing an internal server error page...
and not taking the user to the error page...

Why??

I am using Tomcat 5.0.28..JDK1.4




And in the error page..the code is


[ December 17, 2007: Message edited by: Bear Bibeault ]
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

<%@ page language="java" errorPage="error.jsp"%>



Hint: Check the path to error.jsp in the above line.

Hint2: Look at page 1-44 in the JSP spec (link in my signature) for an example of a well formed errorPage value.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
A Kumar
Ranch Hand

Joined: Jul 04, 2004
Posts: 979
Hint: Check the path to error.jsp in the above line.


the error.jsp is in the same folder as other jsp's...



Hint2: Look at page 1-44 in the JSP spec (link in my signature) for an example of a well formed errorPage value.


Had a look at it..Seems that i have gone wrong with autoFlush attribute..

Correct me if it is something else thats the causse of it...

Would try it again tomm morning in office..

Regards
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

I just tried your code 'as is' and it worked.
My first guess was a relative link problem but, it they are in the same directory, that wouldn't be it.

Check your server logs to see, exactly what's going wrong.
A Kumar
Ranch Hand

Joined: Jul 04, 2004
Posts: 979
Frankly dont know whats the cause of it...

I replaced the file with yesterdays backup copy...and it worked..

the only difference between the 2 files was a System out...

Thanks...all
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Have you looked in your server logs to see what's going wrong?
If not, that would be a good place to start.
A Kumar
Ranch Hand

Joined: Jul 04, 2004
Posts: 979
Yes...

there werent anything related to this page....thats whats compounding the
problem...am not able to find reason for the behaviour...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error page problem
 
Similar Threads
Checking Status of a Checkbox
problem inserting data into MS Access
Configuring error pages in the DD
Problem compiling the code
compilation error in JSP