Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » JSP error page doesn't work in eclipse internal browser but works in chrome(JSP error page using isErrorPage="true" doesn't show up in eclipse internal browser, but works fine in Chrome.)
JSP error page doesn't work in eclipse internal browser but works in chrome [message #1755534] Sun, 05 March 2017 07:26
Pratiksha Jain is currently offline Pratiksha JainFriend
Messages: 1
Registered: March 2017
Junior Member
Hello, I am trying out a simple error page using JSPs which should show up in case of any exception. It works fine with Chrome but not working in Eclipse Internal Browser. Can someone please help if i am missing out on anything.

<%@page  isErrorPage="false" errorPage="error.jsp" %>
String num1=request.getParameter("n1");  
String num2=request.getParameter("n2");  
int a=Integer.parseInt(num1);  
int b=Integer.parseInt(num2);  

int c=a/b;



<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1" isErrorPage="true"%>
 System.out.println("in Error Page");

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Error page</title>
<h3>Sorry an exception occurred!</h3>  
Exception is: <%=exception %>



If i give n2 as 0 and run this using Eclipse internal browser, it show the System.out i have given in error.jsp, but the error page doesn't get displayed whereas it works fine in Chrome.
Is there any thing in the code i am missing or is there any setting to enable this. If someone could please help. Thanks.
Previous Topic:JDT - MarkerResolution - How to show HTML content in Proposal window
Next Topic:JUnit Plug-In Test is run over and over again
Goto Forum:

Current Time: Tue Nov 21 02:47:45 GMT 2017

Powered by FUDForum. Page generated in 0.01590 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software