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

problem while declaring error page

 
Gowher Naik
Ranch Hand
Posts: 643
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have jsp(result.jsp) page as shown below

errorPage.jsp is

My <error-page> tag in web-xml is-:

now problem is that if will remove errorPage directive from result.jsp
then ${pageContext.exception} in errorPage.jsp does not display anything.
why it is so?
Thanks
 
Krishna Srinivasan
Ranch Hand
Posts: 1862
Firefox Browser Java
 
Celinio Fernandes
Ranch Hand
Posts: 549
Eclipse IDE Google Web Toolkit Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you sure ?
Removing that line should not prevent you from still displaying the error.
I removed the line <%@ page errorPage="erreur.jsp" %>
and reduced the JSP to this :

and I still can see the error details using the EL variable pageContext : ${pageContext.exception}


[ November 17, 2006: Message edited by: Max Fernandes ]
[ November 17, 2006: Message edited by: Max Fernandes ]
 
Gowher Naik
Ranch Hand
Posts: 643
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
no i my case it does not display contents of ${pageContext.exception} if i will remove errorPage directive.
i am using Tomcat5.0
 
Renu Radhika
Ranch Hand
Posts: 243
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<@% page isErrorPage="true" %> the syntax is wrong it should be
<%@ page isErrorPage="true" %>

change this and try
 
Gowher Naik
Ranch Hand
Posts: 643
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am using <%@ page isErrorPage="true" %> only.
 
Renu Radhika
Ranch Hand
Posts: 243
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think its because in the page directive you are not using /errorPage.jsp whereas you have specified that way in DD
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic