mcardle     2005/11/30 18:59:07 CET

  Modified files:
    src/org/jahia/esi    Utils.java 
  Log:
  * changed startup and error page logo
  
  Revision  Changes    Path
  1.11      +43 -36    esi_server/src/org/jahia/esi/Utils.java
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/esi_server/src/org/jahia/esi/Utils.java.diff?r1=1.10&r2=1.11&f=h
  
  
  
  Index: Utils.java
  ===================================================================
  RCS file: /home/cvs/repository/esi_server/src/org/jahia/esi/Utils.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- Utils.java        24 Nov 2005 17:25:16 -0000      1.10
  +++ Utils.java        30 Nov 2005 17:59:07 -0000      1.11
  @@ -41,44 +41,44 @@
   
       public static boolean isCacheUrlParamPresent(String url) {
           if (url !=null && (
  -               (GeneralSettings.getInstance().isEnableCacheOff() && 
url.indexOf("/cache/off")!=-1)
  -            || (GeneralSettings.getInstance().isEnableCacheOffOnce() && 
url.indexOf("/cache/offonce")!=-1)
  -            || (GeneralSettings.getInstance().isEnableCacheBypass() && 
url.indexOf("/cache/bypass")!=-1)
  -            ) ) {
  +                (GeneralSettings.getInstance().isEnableCacheOff() && 
url.indexOf("/cache/off")!=-1)
  +                        || 
(GeneralSettings.getInstance().isEnableCacheOffOnce() && 
url.indexOf("/cache/offonce")!=-1)
  +                        || 
(GeneralSettings.getInstance().isEnableCacheBypass() && 
url.indexOf("/cache/bypass")!=-1)
  +        ) ) {
               if (log.isDebugEnabled()) log.debug("Detected a Cache UrlParam 
present in URL:"+url);
               return true;
           }
  -       return false;
  +        return false;
       }
   
       public static boolean isCacheBypass(String url) {
           if (url !=null && (
  -            (GeneralSettings.getInstance().isEnableCacheBypass() && 
url.indexOf("/cache/bypass")!=-1)
  -            ) ) {
  +                (GeneralSettings.getInstance().isEnableCacheBypass() && 
url.indexOf("/cache/bypass")!=-1)
  +        ) ) {
               if (log.isDebugEnabled()) log.debug("Detected a Cache BYPASS 
operation on URL:"+url);
               return true;
           }
  -       return false;
  +        return false;
       }
   
       public static boolean isCacheOffOnce(String url) {
           if (url !=null && (
  -            (GeneralSettings.getInstance().isEnableCacheOffOnce() && 
url.indexOf("/cache/offonce")!=-1)
  -            ) ) {
  +                (GeneralSettings.getInstance().isEnableCacheOffOnce() && 
url.indexOf("/cache/offonce")!=-1)
  +        ) ) {
               if (log.isDebugEnabled()) log.debug("Detected a Cache OFF_ONCE 
operation on URL:"+url);
               return true;
           }
  -       return false;
  +        return false;
       }
   
       public static boolean isCacheOff(String url) {
           if (url !=null && (
  -            (GeneralSettings.getInstance().isEnableCacheOff() && 
url.indexOf("/cache/off")!=-1)
  -            ) ) {
  +                (GeneralSettings.getInstance().isEnableCacheOff() && 
url.indexOf("/cache/off")!=-1)
  +        ) ) {
               if (log.isDebugEnabled()) log.debug("Detected a Cache OFF 
operation on URL:"+url);
               return true;
           }
  -       return false;
  +        return false;
       }
   
       public static String removeCacheOffOnce(String url) {
  @@ -92,7 +92,7 @@
       public static String[] removeCacheOffOnce(String[] urls) {
           String[] newUrls = new String[urls.length];
           for (int i=0; i < urls.length; i++) {
  -                newUrls[i] = 
removeCacheOffOnce(urls[i]);//urls[i].replaceFirst("/cache/offonce/","/");
  +            newUrls[i] = 
removeCacheOffOnce(urls[i]);//urls[i].replaceFirst("/cache/offonce/","/");
           }
           return newUrls;
       }
  @@ -126,7 +126,7 @@
           //target.setRequestHeader("connection","Keep-Alive, 
Calypso-Control");
       }
   
  -     /**
  +    /**
        * Parse a cookie header into an array of cookies according to RFC 2109.
        *
        * @param header Value of an HTTP "Cookie" header
  @@ -164,7 +164,7 @@
   
       }
   
  -        /**
  +    /**
        * Decode and return the specified URL-encoded String.
        * When the byte array is converted to a string, the system default
        * character encoding is used...  This may be different than some other
  @@ -238,7 +238,7 @@
                   b = (byte)' ';
               } else if (b == '%') {
                   b = (byte) ((convertHexDigit(bytes[ix++]) << 4)
  -                            + convertHexDigit(bytes[ix++]));
  +                        + convertHexDigit(bytes[ix++]));
               }
               bytes[ox++] = b;
           }
  @@ -274,25 +274,19 @@
           StringBuffer buildBuffer         = new StringBuffer();
   
           StringBuffer msg = new StringBuffer ("\n\n\n\n");
  -        /*msg.append ("                                  ____.\n");
  -        msg.append ("                      __/\\ ______|    |__/\\.     
_______\n");
  -        msg.append ("           __   .____|    |       \\   |    +----+      
 \\\n");
  -        msg.append ("   _______|  /--|    |    |    -   \\  _    |    :    - 
  \\_________\n");
  -        msg.append ("  \\\\______: :---|    :    :           |    :    |     
    \\________>\n");
  -        msg.append ("          |__\\---\\_____________:______:    
:____|____:_____\\\n");
  -        msg.append ("                                     /_____|\n");
           msg.append ("\n");
  -        */
  -        msg.append ("                                              
.\"`\".\n");
  -        msg.append ("                                          .-./ _=_ 
\\.-.\n");
  -        msg.append ("                                         {  (,(oYo),) 
}}\n");
  -        msg.append ("                                         {{ |   \"   |} 
}\n");
  -        msg.append ("                                         { { \\(---)/  
}}\n");
  -        msg.append ("                                         {{  }'-=-'{ } 
}\n");
  -        msg.append ("                                         { { }._:_.{  
}}\n");
  -        msg.append ("                                         {{  } -:- { } 
}\n");
  -        msg.append ("                                         {_{ }`===`{  
_}\n");
  -        msg.append ("                                        ((((\\)     
(/))))\n");
  +        msg.append ("         __       .__    .__                            
  .__      \n");
  +        msg.append ("        |__|____  |  |__ |__|____      ____ _____    
____ |  |__   ____\n");
  +        msg.append ("        |  \\__  \\ |  |  \\|  \\__  \\   _/ ___\\\\__  
\\ _/ ___\\|  |  \\_/ __ \\  \n");
  +        msg.append ("        |  |/ __ \\|   Y  \\  |/ __ \\_ \\  \\___ / __ 
\\\\  \\___|   Y  \\  ___/   \n");
  +        msg.append ("    /\\__|  (____  /___|  /__(____  /  \\___  >____  
/\\___  >___|  /\\___  >      \n");
  +        msg.append ("    \\______|    \\/     \\/        \\/       \\/     
\\/     \\/     \\/     \\/   \n");
  +        msg.append ("\n");
  +        msg.append ("                     ______ ______________  __ 
___________   \n");
  +        msg.append ("                    /  ___// __ \\_  __ \\  \\/ // __ 
\\_  __ \\   \n");
  +        msg.append ("                    \\___ \\\\  ___/|  | \\/\\   /\\  
___/|  | \\/  \n");
  +        msg.append ("                   /____  >\\___  >__|    \\_/  \\___  
>__|     \n");
  +        msg.append ("                        \\/     \\/                 \\/ 
       \n");
           msg.append ("\n");
           msg.append ("      . . . s t a r t i n g   j a h i a   W e b c a c h 
e   b u i l d   " + jahiaEsiServerBuildNumber + " . . .\n");
           msg.append ("\n\n");
  @@ -324,6 +318,19 @@
           page.append("</head>\n" );
           page.append("\n" );
           page.append("<body bgcolor=\"white\">\n" );
  +        page.append ("<pre>     __       .__    .__                          
    .__      \n");
  +        page.append ("    |__|____  |  |__ |__|____      ____ _____    ____ 
|  |__   ____\n");
  +        page.append ("    |  \\__  \\ |  |  \\|  \\__  \\   _/ ___\\\\__  \\ 
_/ ___\\|  |  \\_/ __ \\  \n");
  +        page.append ("    |  |/ __ \\|   Y  \\  |/ __ \\_ \\  \\___ / __ 
\\\\  \\___|   Y  \\  ___/   \n");
  +        page.append ("/\\__|  (____  /___|  /__(____  /  \\___  >____  
/\\___  >___|  /\\___  >      \n");
  +        page.append ("\\______|    \\/     \\/        \\/       \\/     \\/  
   \\/     \\/     \\/   \n");
  +        page.append ("\n");
  +        page.append ("                 ______ ______________  __ ___________ 
  \n");
  +        page.append ("                /  ___// __ \\_  __ \\  \\/ // __ \\_  
__ \\   \n");
  +        page.append ("                \\___ \\\\  ___/|  | \\/\\   /\\  
___/|  | \\/  \n");
  +        page.append ("               /____  >\\___  >__|    \\_/  \\___  
>__|     \n");
  +        page.append ("                    \\/     \\/                 \\/    
    </pre>\n");
  +        page.append ("\n");
           page.append("<fieldset style='border-width: 4px; border-color: red; 
border: inset'> <font color=\"red\">\n" );
           page.append("<h1>Error due to Response from Application Web 
Server</h1>\n" );
           page.append("<p>No Response from Application Web Server</p>\n" );
  

Reply via email to