Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

problem while declaring error page

 
Ranch Hand
Posts: 643
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 1880
Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Read This :
http://www.onjava.com/pub/a/onjava/2003/12/03/JSP2part2.html
 
Ranch Hand
Posts: 563
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i am using <%@ page isErrorPage="true" %> only.
 
Renu Radhika
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Your mother is a hamster and your father smells of tiny ads!
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic