tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject svn commit: r525818 - in /tomcat/tc6.0.x/trunk/webapps/docs/appdev: build.xml.txt sample/sample.war sample/src/mypackage/Hello.java sample/web/hello.jsp
Date Thu, 05 Apr 2007 13:16:44 GMT
Author: remm
Date: Thu Apr  5 06:16:43 2007
New Revision: 525818

URL: http://svn.apache.org/viewvc?view=rev&rev=525818
Log:
- Simplify the test hello webapp.
- Fix its build script.

Modified:
    tomcat/tc6.0.x/trunk/webapps/docs/appdev/build.xml.txt
    tomcat/tc6.0.x/trunk/webapps/docs/appdev/sample/sample.war
    tomcat/tc6.0.x/trunk/webapps/docs/appdev/sample/src/mypackage/Hello.java
    tomcat/tc6.0.x/trunk/webapps/docs/appdev/sample/web/hello.jsp

Modified: tomcat/tc6.0.x/trunk/webapps/docs/appdev/build.xml.txt
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/appdev/build.xml.txt?view=diff&rev=525818&r1=525817&r2=525818
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/docs/appdev/build.xml.txt (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/appdev/build.xml.txt Thu Apr  5 06:16:43 2007
@@ -1,6 +1,6 @@
 <!--
      General purpose build script for web applications and web services,
-     including enhanced support for deploying directly to a Tomcat 5
+     including enhanced support for deploying directly to a Tomcat 6
      based server.
 
      This build script assumes that the source code of your web application
@@ -88,7 +88,7 @@
                        Defaults to "build".
 
   catalina.home        The directory in which you have installed
-                       a binary distribution of Tomcat 5.  This will
+                       a binary distribution of Tomcat 6.  This will
                        be used by the "deploy" target.
 
   dist.home            The name of the base directory in which
@@ -121,55 +121,6 @@
   <property name="web.home"      value="${basedir}/web"/>
 
 
-<!-- ================== Custom Ant Task Definitions ======================= -->
-
-
-<!--
-
-  These properties define custom tasks for the Ant build tool that interact
-  with the "/manager" web application installed with Tomcat 5.  Before they
-  can be successfully utilized, you must perform the following steps:
-
-  - Copy the file "server/lib/catalina-ant.jar" from your Tomcat 5
-    installation into the "lib" directory of your Ant installation.
-
-  - Create a "build.properties" file in your application's top-level
-    source directory (or your user login home directory) that defines
-    appropriate values for the "manager.password", "manager.url", and
-    "manager.username" properties described above.
-
-  For more information about the Manager web application, and the functionality
-  of these tasks, see <http://localhost:8080/tomcat-docs/manager-howto.html>.
-
--->
-
-  <taskdef name="deploy"   classname="org.apache.catalina.ant.DeployTask"/>
-  <taskdef name="list"     classname="org.apache.catalina.ant.ListTask"/>
-  <taskdef name="reload"   classname="org.apache.catalina.ant.ReloadTask"/>
-  <taskdef name="undeploy" classname="org.apache.catalina.ant.UndeployTask"/>
-
-
-<!--  ==================== Compilation Control Options ==================== -->
-
-<!--
-
-  These properties control option settings on the Javac compiler when it
-  is invoked using the <javac> task.
-
-  compile.debug        Should compilation include the debug option?
-
-  compile.deprecation  Should compilation include the deprecation option?
-
-  compile.optimize     Should compilation include the optimize option?
-
--->
-
-  <property name="compile.debug"       value="true"/>
-  <property name="compile.deprecation" value="false"/>
-  <property name="compile.optimize"    value="true"/>
-
-
-
 <!-- ==================== External Dependencies =========================== -->
 
 
@@ -182,7 +133,7 @@
   * Being copied into the "/WEB-INF/lib" directory during execution
     of the "deploy" target.
 
-  Because we will automatically include all of the Java classes that Tomcat 5
+  Because we will automatically include all of the Java classes that Tomcat 6
   exposes to web applications, we will not need to explicitly list any of those
   dependencies.  You only need to worry about external dependencies for JAR
   files that you are going to include inside your "/WEB-INF/lib" directory.
@@ -218,15 +169,11 @@
 -->
 
     <!-- Include all elements that Tomcat exposes to applications -->
-    <pathelement location="${catalina.home}/common/classes"/>
-    <fileset dir="${catalina.home}/common/endorsed">
-      <include name="*.jar"/>
-    </fileset>
-    <fileset dir="${catalina.home}/common/lib">
+    <fileset dir="${catalina.home}/bin">
       <include name="*.jar"/>
     </fileset>
-    <pathelement location="${catalina.home}/shared/classes"/>
-    <fileset dir="${catalina.home}/shared/lib">
+    <pathelement location="${catalina.home}/lib"/>
+    <fileset dir="${catalina.home}/lib">
       <include name="*.jar"/>
     </fileset>
 
@@ -234,6 +181,53 @@
 
 
 
+<!-- ================== Custom Ant Task Definitions ======================= -->
+
+
+<!--
+
+  These properties define custom tasks for the Ant build tool that interact
+  with the "/manager" web application installed with Tomcat 6.  Before they
+  can be successfully utilized, you must perform the following steps:
+
+  - Copy the file "lib/catalina-ant.jar" from your Tomcat 6
+    installation into the "lib" directory of your Ant installation.
+
+  - Create a "build.properties" file in your application's top-level
+    source directory (or your user login home directory) that defines
+    appropriate values for the "manager.password", "manager.url", and
+    "manager.username" properties described above.
+
+  For more information about the Manager web application, and the functionality
+  of these tasks, see <http://localhost:8080/tomcat-docs/manager-howto.html>.
+
+-->
+
+  <taskdef resource="org/apache/catalina/ant/catalina.tasks"
+           classpathref="compile.classpath"/>
+
+
+<!--  ==================== Compilation Control Options ==================== -->
+
+<!--
+
+  These properties control option settings on the Javac compiler when it
+  is invoked using the <javac> task.
+
+  compile.debug        Should compilation include the debug option?
+
+  compile.deprecation  Should compilation include the deprecation option?
+
+  compile.optimize     Should compilation include the optimize option?
+
+-->
+
+  <property name="compile.debug"       value="true"/>
+  <property name="compile.deprecation" value="false"/>
+  <property name="compile.optimize"    value="true"/>
+
+
+
 <!-- ==================== All Target ====================================== -->
 
 <!--
@@ -337,7 +331,7 @@
 
 <!--
 
-  The "install" target tells the specified Tomcat 5 installation to dynamically
+  The "install" target tells the specified Tomcat 6 installation to dynamically
   install this web application and make it available for execution.  It does
   *not* cause the existence of this web application to be remembered across
   Tomcat restarts; if you restart the server, you will need to re-install all
@@ -395,7 +389,7 @@
 
 <!--
 
-  The "list" target asks the specified Tomcat 5 installation to list the
+  The "list" target asks the specified Tomcat 6 installation to list the
   currently running web applications, either loaded at startup time or
   installed dynamically.  It is useful to determine whether or not the
   application you are currently developing has been installed.
@@ -455,7 +449,7 @@
 
 <!--
 
-  The "reload" signals the specified application Tomcat 5 to shut itself down
+  The "reload" signals the specified application Tomcat 6 to shut itself down
   and reload. This can be useful when the web application context is not
   reloadable and you have updated classes or property files in the
   /WEB-INF/classes directory or when you have added or updated jar files in the
@@ -482,7 +476,7 @@
 
 <!--
 
-  The "remove" target tells the specified Tomcat 5 installation to dynamically
+  The "remove" target tells the specified Tomcat 6 installation to dynamically
   remove this web application from service.
 
   NOTE:  This is the logical opposite of the "install" target.

Modified: tomcat/tc6.0.x/trunk/webapps/docs/appdev/sample/sample.war
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/appdev/sample/sample.war?view=diff&rev=525818&r1=525817&r2=525818
==============================================================================
Binary files - no diff available.

Modified: tomcat/tc6.0.x/trunk/webapps/docs/appdev/sample/src/mypackage/Hello.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/appdev/sample/src/mypackage/Hello.java?view=diff&rev=525818&r1=525817&r2=525818
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/docs/appdev/sample/src/mypackage/Hello.java (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/appdev/sample/src/mypackage/Hello.java Thu Apr  5 06:16:43
2007
@@ -69,22 +69,9 @@
 	writer.println("<td>");
 	writer.println("<h1>Sample Application Servlet</h1>");
 	writer.println("This is the output of a servlet that is part of");
-	writer.println("the Hello, World application.  It displays the");
-	writer.println("request headers from the request we are currently");
-	writer.println("processing.");
+	writer.println("the Hello, World application.");
 	writer.println("</td>");
 	writer.println("</tr>");
-	writer.println("</table>");
-
-	writer.println("<table border=\"0\" width=\"100%\">");
-	Enumeration names = request.getHeaderNames();
-	while (names.hasMoreElements()) {
-	    String name = (String) names.nextElement();
-	    writer.println("<tr>");
-	    writer.println("  <th align=\"right\">" + name + ":</th>");
-	    writer.println("  <td>" + request.getHeader(name) + "</td>");
-	    writer.println("</tr>");
-	}
 	writer.println("</table>");
 
 	writer.println("</body>");

Modified: tomcat/tc6.0.x/trunk/webapps/docs/appdev/sample/web/hello.jsp
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/appdev/sample/web/hello.jsp?view=diff&rev=525818&r1=525817&r2=525818
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/docs/appdev/sample/web/hello.jsp (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/appdev/sample/web/hello.jsp Thu Apr  5 06:16:43 2007
@@ -12,33 +12,12 @@
 <td>
 <h1>Sample Application JSP Page</h1>
 This is the output of a JSP page that is part of the Hello, World
-application.  It displays several useful values from the request
-we are currently processing.
+application.
 </td>
 </tr>
 </table>
 
-<table border="0" border="100%">
-<tr>
-  <th align="right">Context Path:</th>
-  <td align="left"><%= request.getContextPath() %></td>
-</tr>
-<tr>
-  <th align="right">Path Information:</th>
-  <td align="left"><%= request.getPathInfo() %></td>
-</tr>
-<tr>
-  <th align="right">Query String:</th>
-  <td align="left"><%= request.getQueryString() %></td>
-</tr>
-<tr>
-  <th align="right">Request Method:</th>
-  <td align="left"><%= request.getMethod() %></td>
-</tr>
-<tr>
-  <th align="right">Servlet Path:</th>
-  <td align="left"><%= request.getServletPath() %></td>
-</tr>
-</table>
+<%= new String("Hello!") %>
+
 </body>
 </html>



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


Mime
View raw message