FAQ
Author: lu4242
Date: Fri Jul 22 21:03:48 2011
New Revision: 1149738

URL: http://svn.apache.org/viewvc?rev=1149738&view=rev
Log:
MYFACES-3207 ErrorPageWriter: provide info about component(s) that triggered the problem (small fix over getRealPath() and tomcat 7)

Modified:
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/ErrorPageWriter.java

Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/ErrorPageWriter.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/ErrorPageWriter.java?rev=1149738&r1=1149737&r2=1149738&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/ErrorPageWriter.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/ErrorPageWriter.java Fri Jul 22 21:03:48 2011
@@ -315,8 +315,21 @@ public final class ErrorPageWriter
String viewId = faces.getViewRoot().getViewId();
writer.write("viewId=" + viewId);
writer.write("<br/>");
- writer.write("location=" + faces.getExternalContext().getRealPath(viewId));
- writer.write("<br/>");
+ String realPath = null;
+ try
+ {
+ //Could not work on tomcat 7 running by cargo
+ realPath = faces.getExternalContext().getRealPath(viewId);
+ }
+ catch(Throwable e)
+ {
+ //swallow it
+ }
+ if (realPath != null)
+ {
+ writer.write("location=" + realPath);
+ writer.write("<br/>");
+ }
writer.write("phaseId=" + faces.getCurrentPhaseId());
writer.write("<br/>");
writer.write("<br/>");

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcommits @
categoriesmyfaces
postedJul 22, '11 at 9:04p
activeJul 22, '11 at 9:04p
posts1
users1
websitemyfaces.apache.org

1 user in discussion

Lu4242: 1 post

People

Translate

site design / logo © 2019 Grokbase