You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by de...@struts.apache.org on 2004/05/09 15:59:37 UTC

[Apache Struts Wiki] Updated: StrutsCatalogEschewUrlForProtocol

   Date: 2004-05-09T06:59:37
   Editor: 131.191.40.91 <>
   Wiki: Apache Struts Wiki
   Page: StrutsCatalogEschewUrlForProtocol
   URL: http://wiki.apache.org/struts/StrutsCatalogEschewUrlForProtocol

   no comment

Change Log:

------------------------------------------------------------------------------
@@ -46,7 +46,11 @@
     String fileName = request.getParameter(ImageConstant.NAME);
     String contentType = null;
     String file = null;
-    if (fileType == ImageConstant.JPEG_FILE) {
+    if (fileType == ImageConstant.CSS_FILE) {
+      contentType = ImageConstant.CSS_CONTENT;
+      file        = ImageConstant.CSS_LOCATION;
+    }
+    else if (fileType == ImageConstant.JPEG_FILE) {
       contentType = ImageConstant.JPEG_CONTENT;
       file        = ImageConstant.JPEG_LOCATION;
     }
@@ -58,7 +62,7 @@
       contentType = ImageConstant.GIF_CONTENT;
       file        = ImageConstant.GIF_LOCATION;
     }
-    else if (fileType == ImageConstant.TEXT_FILE || fileType == ImageConstant.CSS_FILE) {
+    else if (fileType == ImageConstant.TEXT_FILE) {
       contentType = ImageConstant.TEXT_CONTENT;
       file        = ImageConstant.TEXT_LOCATION;
     }
@@ -87,6 +91,7 @@
   public static final String NAME = "file_name";
 
   // Content types
+  public static final String CSS_CONTENT = "text/css";
   public static final String HTML_CONTENT = "text/html";
   public static final String TEXT_CONTENT = "text/plain";
   public static final String GIF_CONTENT = "image/gif";
@@ -108,6 +113,7 @@
   private static final String APPLET_PATH = ("classes" + File.separator + "com" + File.separator + "crackwillow" + File.separator);
 
   // File file locations
+  public static final String CSS_LOCATION = (VIEW_PATH + "css" + File.separator);
   public static final String HTML_LOCATION = (VIEW_PATH   + "html"   + File.separator);
   public static final String TEXT_LOCATION = (VIEW_PATH   + "text"    + File.separator);
   public static final String GIF_LOCATION = (VIEW_PATH   + "gif"    + File.separator);

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