You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Chen, Gin" <Gi...@NielsenMedia.com> on 2003/05/15 16:05:00 UTC

RE: Anyone know why doesn't work o n an error page?

>From the JSP Spec (1.2 fcs)
"The offending java.lang.Throwable describing the error that occurred is
stored
in the javax.ServletRequest instance for the client request using the
setAttribute()
method, using the name "javax.servlet.jsp.jspException". Names starting with
the
prefixes "java" and "javax" are reserved by the different specifications of
the Java
platform. The "javax.servlet" prefix is reserved and used by the Servlet and
JSP
specifications.
If the errorPage attribute of a page directive names a URL that refers to
another JSP, and that JSP indicates that it is an error page (by setting the
page
directive's isErrorPage attribute to true) then the "exception" implicit
scripting
language variable of that page is initialized to the offending Throwable
reference"

Therefore to get it you should do:

<c:out value="${ requestScope["javax.servlet.jsp.jspException"] }"/>

However if your in an error page then I'm not sure other than that perhaps
the implicit exception object is declared but not scoped.
Try playing around with the different scopes to see if it appears.
-Tim

-----Original Message-----
From: Chris Hardin [mailto:CHardin@emageon.com]
Sent: Thursday, May 15, 2003 9:57 AM
To: Struts Mailing List (E-mail)
Subject: Anyone know why <c:out value="${exception}" /> doesn't work on
an error page?




  Anyone know why this doesn't workm on my error page
<c:out value="${exception}" />

and this does . . .

<%= exception %>

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org