Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

<error-page> tag mechanism

 
Kamila Rutkowski
Ranch Hand
Posts: 37
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I put this tag in web.xml:


but when the error occurs my browser doesn't show errormessage.jsp! instead I see this message:

The website cannot display the page
HTTP 500
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64188
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As this is not Tomcat-specific, it's been moved to the Servlets forum.
 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is present inside errormessage.jsp ??

 
Kamila Rutkowski
Ranch Hand
Posts: 37
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ravi Kiran Va wrote:what is present inside errormessage.jsp ??



<%@ page isErrorPage="true"%>
<html>
<head></head>
<body>
An error has occurred.
</body>
</html>
 
Abimaran Kugathasan
Ranch Hand
Posts: 2066
Clojure IntelliJ IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try to use <error-code>.
 
Naren Chivukula
Ranch Hand
Posts: 577
Java Notepad Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Two things!

1. Have you tried putting this code in your jsp throwing any subclass of Throwable?


2. Have you checked if the page not displayed due to some kind of Error which is not a sub-class of Throwable?

Try to use <error-code>.

You don't need to necessarily use errorcode, errorpage should work.

Cheers,
Naren
---------------------------------
SCJP
SCDJWS
SCWCD
 
Kamila Rutkowski
Ranch Hand
Posts: 37
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Error is a sub-class of Throwable. I don't want to use because my project is JSF based on Facelets.

Naren Chivukula wrote:Two things!

1. Have you tried putting this code in your jsp throwing any subclass of Throwable?


2. Have you checked if the page not displayed due to some kind of Error which is not a sub-class of Throwable?

Try to use <error-code>.

You don't need to necessarily use errorcode, errorpage should work.

Cheers,
Naren
---------------------------------
SCJP
SCDJWS
SCWCD
 
Abimaran Kugathasan
Ranch Hand
Posts: 2066
Clojure IntelliJ IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think, we should specify 3 things.

1) In web.xml, the DD
2) isErrorPage attribute of page directive of the error jsp/html.
3) setting the errorPage attribute of the page directive of the jsp with corresponding error page.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic