remm        2003/07/29 05:19:06

  Modified:    catalina/src/share/org/apache/catalina/servlets
                        DefaultServlet.java
               catalina/src/share/org/apache/catalina/valves
                        ErrorReportValve.java
  Added:       catalina/src/share/org/apache/catalina/util TomcatCSS.java
  Log:
  - Put the CSS in a util class.
  
  Revision  Changes    Path
  1.15      +5 -10     
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java
  
  Index: DefaultServlet.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- DefaultServlet.java       25 Jul 2003 19:26:31 -0000      1.14
  +++ DefaultServlet.java       29 Jul 2003 12:19:06 -0000      1.15
  @@ -1504,12 +1504,7 @@
           sb.append(sm.getString("directory.title", name));
           sb.append("</title>\r\n");
           sb.append("<STYLE><!--");
  -        sb.append("H1{font-family : sans-serif,Arial,Tahoma;color : 
white;background-color : #0086b2;} ");
  -        sb.append("H3{font-family : sans-serif,Arial,Tahoma;color : 
white;background-color : #0086b2;} ");
  -        sb.append("BODY{font-family : sans-serif,Arial,Tahoma;color : 
black;background-color : white;} ");
  -        sb.append("B{color : white;background-color : #0086b2;} ");
  -        sb.append("A{color : black;} ");
  -        sb.append("HR{color : #0086b2;} ");
  +        sb.append(org.apache.catalina.util.TomcatCSS.TOMCAT_CSS);
           sb.append("--></STYLE> ");
           sb.append("</head>\r\n");
           sb.append("<body>");
  
  
  
  1.1                  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/util/TomcatCSS.java
  
  Index: TomcatCSS.java
  ===================================================================
  /*
   * $Header: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/util/TomcatCSS.java,v
 1.1 2003/07/29 12:19:06 remm Exp $
   * $Revision: 1.1 $
   * $Date: 2003/07/29 12:19:06 $
   *
   * ====================================================================
   *
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *    any, must include the following acknowlegement:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowlegement may appear in the software itself,
   *    if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
   *    Foundation" must not be used to endorse or promote products derived
   *    from this software without prior written permission. For written
   *    permission, please contact [EMAIL PROTECTED]
   *
   * 5. Products derived from this software may not be called "Apache"
   *    nor may "Apache" appear in their names without prior written
   *    permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   * [Additional notices, if required by prior licensing conditions]
   *
   */
  
  
  package org.apache.catalina.util;
  
  
  public class TomcatCSS {
  
      public static final String TOMCAT_CSS =
          "H1 
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#D2A41C;font-size:20px;}
 " +
          "H2 
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#D2A41C;font-size:14px;}
 " +
          "H3 
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#D2A41C;font-size:12px;}
 " +
          "BODY 
{font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} " +
          "B 
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#D2A41C;} " +
          "P 
{font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}" +
          "A{color : black;}" +
          "HR {color : #D2A41C;}";
  
  
  }
  
  
  
  
  1.7       +7 -11     
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/valves/ErrorReportValve.java
  
  Index: ErrorReportValve.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/valves/ErrorReportValve.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ErrorReportValve.java     19 Jul 2003 10:14:17 -0000      1.6
  +++ ErrorReportValve.java     29 Jul 2003 12:19:06 -0000      1.7
  @@ -292,13 +292,9 @@
           sb.append(ServerInfo.getServerInfo()).append(" - ");
           sb.append(sm.getString("errorReportValve.errorReport"));
           sb.append("</title>");
  -        sb.append("<STYLE><!--");
  -        sb.append("H1{font-family : sans-serif,Arial,Tahoma;color : 
white;background-color : #0086b2;} ");
  -        sb.append("H3{font-family : sans-serif,Arial,Tahoma;color : 
white;background-color : #0086b2;} ");
  -        sb.append("BODY{font-family : sans-serif,Arial,Tahoma;color : 
black;background-color : white;} ");
  -        sb.append("B{color : white;background-color : #0086b2;} ");
  -        sb.append("HR{color : #0086b2;} ");
  -        sb.append("--></STYLE> ");
  +        sb.append("<style><!--");
  +        sb.append(org.apache.catalina.util.TomcatCSS.TOMCAT_CSS);
  +        sb.append("--></style> ");
           sb.append("</head><body>");
           sb.append("<h1>");
           sb.append(sm.getString("errorReportValve.statusHeader",
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to