You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Bernhard Huemer <be...@gmail.com> on 2008/01/02 17:23:13 UTC

Re: access to error messages attributes with unitfied EL

Hello,

actually there are two different implicit objects dealing with the 
current request: "request" and "requestScope".

"request" -> externalContext.getRequest();
"requestScope" -> externalContext.getRequestMap();

Accordingly, it should work using the following expression: 
#{requestScope['javax..servlet.error.message']}

regards,
Bernhard Huemer

On 12/27/2007 +0100,
Wolf Benz <eu...@gmail.com> wrote:
> Hi all,
> 
> I know that, within a JSP page, you have access to information about the 
> exception that occurred under several request attribute keys:
> 
>     javax.servlet.error.exception -- the actual exception itself
>     javax.servlet.error.status_code -- the HTTP status code (as a 
> java.lang.Integer)
>     javax.servlet.error.exception_type -- the Class of the exception 
> that was thrown
>     javax.servlet.error.message -- the message string from the exception 
> that was thrown
>     javax.servlet.error.request_uri -- the request URI of the incoming 
> request
>     javax.servlet.error.servlet_name -- the name of the servlet 
> processing the request
> 
> But if you use JSF & facelets, other than using code in a bean doing 
> stuff like:
> requestMap.get("javax.servlet.error.message");
> , is there a way to access them in the pag itself using the unified EL?
> 
> What I've already tried, is:
> 
> - I tried in y JSF page: #{request.javax.servlet.error.message}, but got 
> this error:
> /resources/pages/fileNotFound.xhtml: Property 'javax' not found on type 
> org.apache.catalina.core.ApplicationHttpRequest
> 
> - I cut out the javax... to no avail.
> 
> - I've then tried: #{request['javax.servlet.error.message']}
> 
> All failed.
> Ideas?
> 
> --Wolf
> 
> 
> 
> 
> 
>