You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by at...@apache.org on 2005/08/27 02:39:19 UTC

svn commit: r240366 - /portals/jetspeed-2/trunk/content-server/src/java/org/apache/jetspeed/contentserver/ContentLocatingResponseWrapper.java

Author: ate
Date: Fri Aug 26 17:39:11 2005
New Revision: 240366

URL: http://svn.apache.org/viewcvs?rev=240366&view=rev
Log:
Temporary workaround handling IllegalStateExceptions thrown all the time on WebSphere.
As result, hardly any content (css, images) comes through.
This still doesn't make that working fully again, but at least with IE 6.0 it improves a lot.
With Firefox, the end result is still very bad (but somewhat improved nonetheless).

Modified:
    portals/jetspeed-2/trunk/content-server/src/java/org/apache/jetspeed/contentserver/ContentLocatingResponseWrapper.java

Modified: portals/jetspeed-2/trunk/content-server/src/java/org/apache/jetspeed/contentserver/ContentLocatingResponseWrapper.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/content-server/src/java/org/apache/jetspeed/contentserver/ContentLocatingResponseWrapper.java?rev=240366&r1=240365&r2=240366&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/content-server/src/java/org/apache/jetspeed/contentserver/ContentLocatingResponseWrapper.java (original)
+++ portals/jetspeed-2/trunk/content-server/src/java/org/apache/jetspeed/contentserver/ContentLocatingResponseWrapper.java Fri Aug 26 17:39:11 2005
@@ -18,9 +18,6 @@
 import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.io.PrintWriter;
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.TimeZone;
 
 import javax.servlet.ServletOutputStream;
 import javax.servlet.http.HttpServletResponse;
@@ -113,6 +110,22 @@
                 locationAttempted = true;
                 setContentLength((int) contentLocator.writeToOutputStream(getOutputStream()));
                 setStatus(SC_OK);
+            }
+            catch (IllegalStateException ise)
+            {
+                // on WebSphere this occurs all the time, killing most of the content:
+                // java.lang.IllegalStateException: ERROR: Cannot set header. Response already committed. 
+                // Note: This is a temporary workaround. The real cause still has to be found.
+                try
+                {
+                    super.sendError(SC_NOT_FOUND, message);
+                }
+                catch (Exception unexpected)
+                {
+                    // and still, on WebSphere just sending the error (as requested from within a WebSphere
+                    // SimpleFileServlet fails most of the time.
+                    // So, killing the error is the last resort.
+                }
             }
             catch (FileNotFoundException e)
             {



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