Results 1 to 3 of 3
- 06-19-2008, 05:20 PM #1
Member
- Join Date
- Jun 2008
- Posts
- 2
- Rep Power
- 0
Problem with JSP exception handling page
Hi All.I'm new to JSP's.
I have a problem working with JSP exception handling page.
My index page(index.jsp) was: <html>
<head></head>
<body>
<table align="center" border=1>
<form action="jspex/formHandler.jsp" method = "post">
<tr><td>Enter your first Number: </td>
<td><input type="text" name="fno" /></td></tr>
<tr><td>Enter your Second Number: </td>
<td><input type="text" name="sno" /></td></tr>
<tr ><td colspan="2">
<input type="submit" value="Submit" /></td></tr>
</form>
</table>
</body>
</html>
I tried to post to formHandler.jsp which throws an exception.
formHandler.jsp
<%@ page errorPage="exceptionHandler.jsp" %>
<html>
<head></head>
<body>
<%
int fno;
int sno;
fno = Integer.parseInt(request.getParameter("fno"));
sno = Integer.parseInt(request.getParameter("sno"));
int div=fno/sno;
%>
</body>
</html>
The ExceptionHandler is
exceptionHandler.jsp
<%@ page isErrorPage="true" %>
<% System.out.println("im here at the exception handler"); %>
<body>
Welcome to the exception page
</body>
when I run this application I could see the debugging statement "im here at the exception handler" printed on the log.But my JSP is not displayed with the welcome statement.I see the InternalServer error page being displayed.
Could someone please tell me if i'm missing something.
Thanks in Advance.
- 06-19-2008, 07:16 PM #2
Senior Member
- Join Date
- Jun 2008
- Posts
- 2,366
- Rep Power
- 7
Really, it has nothing to do with jsp, and everything to do with properly formed html.
- 06-19-2008, 07:28 PM #3
Member
- Join Date
- Jun 2008
- Posts
- 2
- Rep Power
- 0
Similar Threads
-
JAXP exception handling
By jovenky in forum Advanced JavaReplies: 0Last Post: 05-27-2008, 01:37 PM -
Exception Handling...
By focus_nitin in forum New To JavaReplies: 1Last Post: 02-16-2008, 03:13 AM -
JDBC - Exception handling
By Java Tip in forum Java TipReplies: 0Last Post: 12-05-2007, 04:00 PM -
Jstl Exception Handling
By vamsidharpoosarla in forum JavaServer Pages (JSP) and JSTLReplies: 2Last Post: 07-18-2007, 06:17 AM -
JSTL Exception Handling
By chaatf in forum JavaServer Pages (JSP) and JSTLReplies: 1Last Post: 07-18-2007, 02:24 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks