This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes JSP and the fly likes Not able to get the new page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » JSP
Bookmark "Not able to get the new page" Watch "Not able to get the new page" New topic

Not able to get the new page

Ravindranath Chowdary
Ranch Hand

Joined: Nov 08, 2006
Posts: 71
Hi Friends,
I want to make use of isErrorPage and errorPage attributes of Page directive in JSP. For that I wrote the following lines of code. But, couldn't able to get the page what I needed. Please, look at the following lines of code and clear my doubt.

In web.xml I added the following lines of code for the error page:-

In the jsp for which error page is needed i mentioned as following in page directive..

<%@ page errorPage="/error.jsp"%>

In the error.jsp:-
<%@ page isErrorPage="true" %>
<title>Error Page</title>
<h2>Your application has generated an error</h2>
<h3>Please notify your help desk.</h3>
<%= exception.toString() %>

After starting the TOMCAT, I just gave some invalid url. It is showing an blank page. How can i get back from this issue?

[ November 19, 2006: Message edited by: Bear Bibeault ]
Christophe Verré

Joined: Nov 24, 2005
Posts: 14688

Blank page ??
First, check Tomcat's log files to see if there's no exception raised.

[My Blog]
All roads lead to JavaRanch
Ravindranath Chowdary
Ranch Hand

Joined: Nov 08, 2006
Posts: 71
I have checked the log file in Tomcat, there no errors raised. Even if I give the invalid url, I am staying in the same page (i.e, the page from which i typed the url).

Ben Souther

Joined: Dec 11, 2004
Posts: 13410

Also try using your browser's "View Source" feature to see if the page really is blank or if there is just an error in you HTML that is keeping the page from rendering.

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: Not able to get the new page
jQuery in Action, 3rd edition