ceki        2005/01/19 09:33:38

  Modified:    examples/tiny-webapp/Tata build.xml
               examples/tiny-webapp INSTALL.txt
  Added:       examples/tiny-webapp/Tata/WebRoot/WEB-INF/classes
                        tata-log4j.xml .cvsignore
               examples/tiny-webapp/Tata/WebRoot/WEB-INF web.xml
               examples/tiny-webapp/Tata/WebRoot index.html
  Removed:     examples/tiny-webapp/Tata/src/resources tata-log4j.xml
               examples/tiny-webapp/Tata/src/WEB-INF web.xml
               examples/tiny-webapp/Tata/src/html index.html
  Log:
  - Files moved around to allow for in place deployment, that is deployment 
without building a jar file.
  - Removed comments suggesting that non-default repositories had default 
configration resources such as log4j.xml or log4j.properties.
  
  Revision  Changes    Path
  1.1                  
logging-log4j/examples/tiny-webapp/Tata/WebRoot/WEB-INF/classes/tata-log4j.xml
  
  Index: tata-log4j.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8" ?>
  <!DOCTYPE log4j:configuration >
  
  
  <log4j:configuration debug="true" 
xmlns:log4j='http://jakarta.apache.org/log4j/'>
  
    <appender name="FILE" class="org.apache.log4j.FileAppender">
      <param name="File" value="/tata.log"/>
      <param name="Append" value="false"/>
      <layout class="org.apache.log4j.PatternLayout">
        <param name="ConversionPattern" value="TATA %r %-5p %c - %m%n"/>
      </layout>     
    </appender>
  
  
    <root>
      <level value="debug"/>
      <appender-ref ref="FILE" />    
    </root>
  </log4j:configuration>
  
  
  
  1.1                  
logging-log4j/examples/tiny-webapp/Tata/WebRoot/WEB-INF/classes/.cvsignore
  
  Index: .cvsignore
  ===================================================================
  wombat
  
  
  
  1.1                  
logging-log4j/examples/tiny-webapp/Tata/WebRoot/WEB-INF/web.xml
  
  Index: web.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 
2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd";>
  <web-app>
  
   <servlet>
      <servlet-name>some-init-servlet</servlet-name>
      <servlet-class>wombat.InitServlet</servlet-class>
      <load-on-startup>1</load-on-startup>
    </servlet>
  
  
    <servlet>
      <servlet-name>TataServlet</servlet-name>
      <servlet-class>wombat.TataServlet</servlet-class>
    </servlet>
  
    <servlet-mapping>
      <servlet-name>TataServlet</servlet-name>
      <url-pattern>/TataServlet</url-pattern>
    </servlet-mapping>
  
    <env-entry>
     <description>JNDI logging context for this app</description>
     <env-entry-name>log4j/context-name</env-entry-name>
     <env-entry-value>tata</env-entry-value>
     <env-entry-type>java.lang.String</env-entry-type>
    </env-entry>
  
    <env-entry>
     <description>URL for configuring log4j context</description>
     <env-entry-name>log4j/configuration-resource</env-entry-name>
     <env-entry-value>tata-log4j.xml</env-entry-value>
     <env-entry-type>java.lang.String</env-entry-type>
    </env-entry>
  
  
     <listener>
       
<listener-class>org.apache.log4j.selector.servlet.ContextDetachingSCL</listener-class>
     </listener>
       
  </web-app>
  
  
  
  1.1                  
logging-log4j/examples/tiny-webapp/Tata/WebRoot/index.html
  
  Index: index.html
  ===================================================================
  
  <HTML>
  <BODY>
  
  <FORM METHOD="POST" ACTION="/tata/TataServlet">
  Enter your name: <INPUT TYPE="text" NAME="name" SIZE="10">
  <INPUT TYPE="submit">
  </FORM>
  
  </BODY>
  </HTML>
  
  
  1.3       +14 -9     logging-log4j/examples/tiny-webapp/Tata/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/logging-log4j/examples/tiny-webapp/Tata/build.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- build.xml 27 Mar 2004 17:31:56 -0000      1.2
  +++ build.xml 19 Jan 2005 17:33:38 -0000      1.3
  @@ -6,15 +6,22 @@
   
     <!-- The build.properties file defines variables dependent of the host 
machine -->
     <property file="build.properties"/>
  -  
  -  <property name="src.dir" value="${basedir}/src/java/"/>
  -  <property name="javac.dest" value="${basedir}/classes"/>
   
  +  <!-- reference to the parent project -->   
  +  <property name="log4j.home" value="../../.."/>
  +
  +  <property name="src.dir" value="${basedir}/src/java/"/>
  +  <property name="WebRoot" value="${basedir}/WebRoot"/>
  +  <property name="WEB-INF" value="${WebRoot}/WEB-INF"/>
  +  <property name="javac.dest" value="${WEB-INF}/classes"/>
  +     
     <property name="webapp-name" value="tata"/>
   
     <path id="compile.classpath">
       <pathelement location="${build.home}/classes"/>
  -    <pathelement location="${log4j.jar}"/>
  +     <fileset dir="${log4j.home}">
  +       <include name="log4j-1.3*.jar"/>
  +     </fileset>
       <pathelement location="${servlet.jar}"/>
     </path>
    
  @@ -32,11 +39,9 @@
     </target>
   
     <target name="war" depends="compile">
  -    <war warfile="${webapp-name}.war" webxml="src/WEB-INF/web.xml">
  -      <classes dir="classes"/>
  -      <zipfileset dir="src/resources" prefix="WEB-INF/classes"/>
  -      <zipfileset dir="src/html" prefix=""/>
  -    </war>
  +    <war warfile="${webapp-name}.war" webxml="${WEB-INF}/web.xml">
  +        <zipfileset dir="${WebRoot}"/>
  +      </war>
     </target>
   
     <!-- ================================================================= -->
  
  
  
  1.5       +4 -4      logging-log4j/examples/tiny-webapp/INSTALL.txt
  
  Index: INSTALL.txt
  ===================================================================
  RCS file: /home/cvs/logging-log4j/examples/tiny-webapp/INSTALL.txt,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- INSTALL.txt       19 Jan 2005 14:11:23 -0000      1.4
  +++ INSTALL.txt       19 Jan 2005 17:33:38 -0000      1.5
  @@ -22,7 +22,7 @@
   
        
-Dlog4j.repositorySelectorClass=org.apache.log4j.selector.ContextJNDISelector
     
  -  or in its equivalent short form
  +  or in its equivalent but shorter form
     
        -Dlog4j.repositorySelectorClass=JNDI 
        
  @@ -31,11 +31,11 @@
   
   - Optionally, you can add a configuration file such as log4j.xml or
     log4j.properties in the class directory of your *web-server*. For
  -  Tomcat versions 4 or 5, that would be ./server/classes/ directory.
  +  Tomcat versions 4 or 5, that would be ./common/classes/ directory.
   
     Thus, when log4j is first loaded into memory, it will configure the
     default logging repository using the configuration file found in
  -  ./server/classes/ directory.
  +  ./common/classes/ directory.
   
     For Tomcat version 5 (tested on Tomcat 5.0.19), you also need to
     tell Tomcat to use log4j by placing commons-logging.jar in
  @@ -45,7 +45,7 @@
     This way the default (log4j) logger repository will be used by
     Tomcat for its logging and the default logger repository will be
     controlled by the configuration file log4j.xml or log4j.properties
  -  found in server/classes/.
  +  found in ./common/classes/.
   
   Steps performed per web-application
   ==================================
  
  
  

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

Reply via email to