portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r380804 - /portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/velocity/JetspeedVelocityViewServlet.java
Date Fri, 24 Feb 2006 20:02:52 GMT
Author: taylor
Date: Fri Feb 24 12:02:50 2006
New Revision: 380804

URL: http://svn.apache.org/viewcvs?rev=380804&view=rev
Log:
override Velocity's error handling to make more friendly for portlets

Modified:
    portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/velocity/JetspeedVelocityViewServlet.java

Modified: portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/velocity/JetspeedVelocityViewServlet.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/velocity/JetspeedVelocityViewServlet.java?rev=380804&r1=380803&r2=380804&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/velocity/JetspeedVelocityViewServlet.java
(original)
+++ portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/velocity/JetspeedVelocityViewServlet.java
Fri Feb 24 12:02:50 2006
@@ -219,7 +219,7 @@
         // setup TLS for Context propagation
         handlingRequestContext.set(ctx);
 
-        // handle request normally
+        // handle request normally        
         return super.handleRequest(request, response, ctx);
     }
 
@@ -674,4 +674,25 @@
         }
         return defaultValue;
     }
+    
+    protected void error(HttpServletRequest request, 
+            HttpServletResponse response, 
+            Exception e)
+    throws ServletException
+    {
+        try
+        {
+            StringBuffer html = new StringBuffer();
+            html.append("<b>\n");
+            html.append("Content is not available");
+            html.append("<b>\n");
+            getResponseWriter(response).write(html.toString());
+            log.error("Error processing vm template ", e);
+        }
+        catch (Exception e2)
+        {
+            log.error("Error writing error message to vm template ", e2);            
+        }        
+    }
+    
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message