Guys I am struggling with the problem of opening my custom error page in Tomcat in Windows Environment. Some of solution I got but no luck. I tried almost all links but its not working for me. Some of them working for other solution deployed in Tomcat but not for my Web Service
My web.xml
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<error-page>
<location>/error.html</location>
</error-page>
I am sending error from my Servlet 3.0 Application
response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
I have put my error.html in the root directory of my WebService.
Some of the links I got for JSP page instead of HTML that also I have tried
In case of JSP I used:
<%@ page isErrorPage="true" %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<h1>Error</h1>
</body>
</html>
FYI it is working fine for other Tomcat inbuilt solution it's working perfectly. But in my Webservice I am getting response 500 but page is opening blank. And one other thing I have disabled my Internet Explorer 9.0 show error friendly page still response coming 500 from servlet. But error page is coming empty.
If any idea or any doubt about my query just let me know. I need it ASAP.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…