Solved

jsp - error page

Posted on 2001-06-19
7
311 Views
Last Modified: 2010-03-31
Im trying to use Errorpage.
In the main page I wrote:
<%@ page errorPage="Error.jsp"%>
In the Error.jsp I wrote:
<%@ page isErrorPage="true"%>

I tried to use the Exception object, for example:
<%=exception.toString()%>
But I couldnt.
What else should I add to get the exception object in Error.jsp?
(The browser gets to the right page "Error.jsp" does all the other things in the page except getting the Exception object).
0
Comment
Question by:uri22
7 Comments
 
LVL 1

Expert Comment

by:paragm
Comment Utility
HI,

 You need to throw the exception initializing it with some value.
0
 
LVL 1

Author Comment

by:uri22
Comment Utility
I forgot to write this in the original question,
I wrote:
<% if(x==null){
       throw new Exception("x=null);
} %>

It didnt work, how do I supose to throw this exception?
0
 
LVL 1

Accepted Solution

by:
rajendra_rathod earned 50 total points
Comment Utility
In my case i have used following lines and are working fine
<%@ page language="java"  import="java.sql.*,java.net.*, Validation" errorPage="error.jsp"%>

error.jsp
<%@ page language="java" isErrorPage="true"%>
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Expert Comment

by:klaetu
Comment Utility
Please accept a comment or a proposed answer to this question- if not, please comment as to why not or delete it.

Thanks
Klaetu, EE Community Moderator
0
 
LVL 5

Expert Comment

by:Netminder
Comment Utility
0
 
LVL 5

Expert Comment

by:Netminder
Comment Utility
There has been no activity in this question in quite some time, and it looks like it has been abandoned. As part of our ongoing mission to clean up the topic areas, a Moderator will finalize this question within the next seven (7) days. At that time, either I or one of the other Moderators will force/accept the comment of rajendra_rathod.

DO NOT ACCEPT THIS COMMENT AS AN ANSWER. If you have further comments on this question or the recommendation, please leave them here.

Thanks,

Netminder
Community Support Moderator
Experts Exchange
0
 
LVL 5

Expert Comment

by:Netminder
Comment Utility
Force/accepted by

Netminder
Community Support Moderator
Experts Exchange
 
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
parentbit challenge 3 51
recursion example 16 68
mockito example issue 8 30
GUI builder for Eclipse? 8 7
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now