[seam-commits] Seam SVN: r15627 - branches/enterprise/JBPAPP_5_0/ui/src/main/java/org/jboss/seam/ui/resource.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Thu Oct 24 10:21:52 EDT 2013


Author: manaRH
Date: 2013-10-24 10:21:52 -0400 (Thu, 24 Oct 2013)
New Revision: 15627

Removed:
   branches/enterprise/JBPAPP_5_0/ui/src/main/java/org/jboss/seam/ui/resource/WebResource.java
Log:
https://issues.jboss.org/browse/JBPAPP-10877 removed useless WebResource class

Deleted: branches/enterprise/JBPAPP_5_0/ui/src/main/java/org/jboss/seam/ui/resource/WebResource.java
===================================================================
--- branches/enterprise/JBPAPP_5_0/ui/src/main/java/org/jboss/seam/ui/resource/WebResource.java	2013-10-24 12:35:47 UTC (rev 15626)
+++ branches/enterprise/JBPAPP_5_0/ui/src/main/java/org/jboss/seam/ui/resource/WebResource.java	2013-10-24 14:21:52 UTC (rev 15627)
@@ -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