[seam-commits] Seam SVN: r15634 - branches/enterprise/WFK-2_1/jboss-seam-ui/src/main/java/org/jboss/seam/ui/resource.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Mon Nov 4 02:58:27 EST 2013


Author: manaRH
Date: 2013-11-04 02:58:27 -0500 (Mon, 04 Nov 2013)
New Revision: 15634

Removed:
   branches/enterprise/WFK-2_1/jboss-seam-ui/src/main/java/org/jboss/seam/ui/resource/WebResource.java
Log:
https://issues.jboss.org/browse/WFK2-296 removed WebResource class from jboss-seam-ui

Deleted: branches/enterprise/WFK-2_1/jboss-seam-ui/src/main/java/org/jboss/seam/ui/resource/WebResource.java
===================================================================
--- branches/enterprise/WFK-2_1/jboss-seam-ui/src/main/java/org/jboss/seam/ui/resource/WebResource.java	2013-11-01 14:27:07 UTC (rev 15633)
+++ branches/enterprise/WFK-2_1/jboss-seam-ui/src/main/java/org/jboss/seam/ui/resource/WebResource.java	2013-11-04 07:58:27 UTC (rev 15634)
@@ -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