[seam-commits] Seam SVN: r15630 - JBPAPP_5_1_0_JBPAPP-10878/ui/src/main/java/org/jboss/seam/ui/resource.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Fri Oct 25 10:37:41 EDT 2013


Author: manaRH
Date: 2013-10-25 10:37:40 -0400 (Fri, 25 Oct 2013)
New Revision: 15630

Removed:
   JBPAPP_5_1_0_JBPAPP-10878/ui/src/main/java/org/jboss/seam/ui/resource/WebResource.java
Log:
https://issues.jboss.org/browse/JBPAPP-10878

Deleted: JBPAPP_5_1_0_JBPAPP-10878/ui/src/main/java/org/jboss/seam/ui/resource/WebResource.java
===================================================================
--- JBPAPP_5_1_0_JBPAPP-10878/ui/src/main/java/org/jboss/seam/ui/resource/WebResource.java	2013-10-24 14:42:05 UTC (rev 15629)
+++ JBPAPP_5_1_0_JBPAPP-10878/ui/src/main/java/org/jboss/seam/ui/resource/WebResource.java	2013-10-25 14:37:40 UTC (rev 15630)
@@ -1,61 +0,0 @@
-package org.jboss.seam.ui.resource;
-
-import static org.jboss.seam.ScopeType.APPLICATION;
-import static org.jboss.seam.annotations.Install.BUILT_IN;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.jboss.seam.annotations.Install;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.util.Resources;
-import org.jboss.seam.web.AbstractResource;
-
- at Scope(APPLICATION)
- at Name("org.jboss.seam.ui.resource.webResource")
- at Install(precedence = BUILT_IN)
- at BypassInterceptors
-public class WebResource extends AbstractResource
-{
-   public static final String WEB_RESOURCE_PATH = "/seam/resource/web";
-   
-   private static final String RESOURCE_PATH = "/web";
-   
-   @Override
-   public String getResourcePath()
-   {
-      return RESOURCE_PATH;
-   }
-   
-   @Override
-   public void getResource(HttpServletRequest request, HttpServletResponse response)
-      throws IOException
-   {
-      String pathInfo = request.getPathInfo().substring(getResourcePath().length()); 
-      
-      InputStream in = Resources.getResourceAsStream( "/org/jboss/seam/ui/resource" + pathInfo, getServletContext() );
-      
-      try {
-          if (in != null) {
-              byte[] buffer = new byte[1024];
-              int read = in.read(buffer);
-              while (read != -1) {
-                  response.getOutputStream().write(buffer, 0, read);
-                  read = in.read(buffer);
-              }
-              response.getOutputStream().flush();
-          } else {
-              response.sendError(HttpServletResponse.SC_NOT_FOUND);
-          }
-      } finally {
-          Resources.closeStream(in);
-      }
-   }
-
-
-}



More information about the seam-commits mailing list