You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by Apache Wiki <wi...@apache.org> on 2007/05/01 20:14:40 UTC

[Myfaces Wiki] Update of "Handling Server Errors" by MarioIvankovits

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Myfaces Wiki" for change notification.

The following page has been changed by MarioIvankovits:
http://wiki.apache.org/myfaces/Handling_Server_Errors

The comment on the change is:
there the generic requestMap were accessed and NOT the requestParameterMap ...

------------------------------------------------------------------------------
  
      public String getStackTrace() {
          FacesContext context = FacesContext.getCurrentInstance();
- //        Map requestMap = context.getExternalContext().getRequestMap();
+         Map requestMap = context.getExternalContext().getRequestMap();
- //        Throwable ex = (Throwable) requestMap.get("javax.servlet.error.exception");
+         Throwable ex = (Throwable) requestMap.get("javax.servlet.error.exception");
- 
-         HttpServletRequest request = (HttpServletRequest)context.getExternalContext().getRequest();
-         Throwable ex = (Throwable) request.getAttribute("javax.servlet.error.exception");
  
          StringWriter writer = new StringWriter();
          PrintWriter pw = new PrintWriter(writer);