You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beehive.apache.org by ek...@apache.org on 2005/09/08 14:44:43 UTC
svn commit: r279562 -
/beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/netui/projects.xml
Author: ekoneil
Date: Thu Sep 8 05:44:40 2005
New Revision: 279562
URL: http://svn.apache.org/viewcvs?rev=279562&view=rev
Log:
Formatting in projects.xml before editing.
BB: self
Test: build.release pass
Modified:
beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/netui/projects.xml
Modified: beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/netui/projects.xml
URL: http://svn.apache.org/viewcvs/beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/netui/projects.xml?rev=279562&r1=279561&r2=279562&view=diff
==============================================================================
--- beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/netui/projects.xml (original)
+++ beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/netui/projects.xml Thu Sep 8 05:44:40 2005
@@ -5,20 +5,15 @@
<title>NetUI Web App Project Model</title>
</header>
<body>
-
<section id="introduction">
<title>Introduction</title>
-
<p>
Now that the basics of NetUI have been explained, you need to know how to put together a web project that
uses NetUI Page Flow and the NetUI JSP tags. Beehive ships with a set of Ant build files to help with this task.
</p>
-
</section>
-
- <section id="source_tree_layout">
+ <section id="sourceTreeLayout">
<title>Project Layout</title>
-
<p>
Your project may live anywhere on your local disk. For now, we will assume that you have a simple project layout
in the style of the blank sample NetUI project (<a href="site:netui-blank">Project: NetUI</a>). In this
@@ -41,7 +36,6 @@
build.properties
build.xml
web.xml</source>
-
<section id="projectRoot">
<title><code>project/</code></title>
<p>
@@ -59,7 +53,6 @@
file at <code>project/WEB-INF/.pageflow-struts-generated/jpf-struts-config-myPageFlow.xml</code>.
</p>
</section>
-
<section id="webinfSrc">
<title><code>project/WEB-INF/src</code></title>
<p>
@@ -70,147 +63,156 @@
</p>
</section>
-
<section id="webinfLib">
<title><code>project/WEB-INF/lib/</code></title>
-
<p>
As with any other web application, the <code>project/WEB-INF/lib</code> directory contains the JAR files
used by your application, including those required by Beehive itself. The jars required by Beehive are
listed below.
</p>
-
<note>
These JAR files are installed automatically during the <a href="#building">build</a>. The list below is
for reference only; you do not need to install the JARs by hand. If you want, you can always install
them into a web project using the following command:
- <code>ant -f </code><em>beehive-home</em><code>/ant/beehive-runtime.xml
- -Dwebapp.dir=</code><em>full-path-to-project-directory</em><code>
- deploy.beehive.webapp.runtime</code>
+ <code><![CDATA[
+ant -f <beehive-home>/ant/beehive-runtime.xml -Dwebapp.dir=<full-path-to-project-directory> deploy.beehive.webapp.runtime
+ ]]></code>
</note>
-
<table>
<tr>
<th>Project</th>
<th>Jar</th>
<th>Version</th>
+ <th>Required</th>
</tr>
<tr>
<td>Beehive Controls</td>
<td>beehive-controls.jar</td>
<td><em>distribution</em></td>
+ <td>Yes</td>
</tr>
<tr>
<td>Beehive NetUI</td>
<td>beehive-netui-core.jar</td>
<td><em>distribution</em></td>
+ <td>Yes (when using NetUI JSP tags)</td>
</tr>
<tr>
<td>Beehive NetUI</td>
<td>beehive-netui-tags.jar</td>
<td><em>distribution</em></td>
+ <td>No</td>
</tr>
<tr>
<td>Jakarta Commons Bean Utils</td>
<td>commons-beanutils.jar</td>
<td>1.6</td>
+ <td>Yes</td>
</tr>
<tr>
<td>Jakarta Commons Codec</td>
<td>commons-codec-1.3.jar</td>
<td>1.3</td>
+ <td>Yes</td>
</tr>
<tr>
<td>Jakarta Commons Collections</td>
<td>commons-collections.jar</td>
<td>2.1.1</td>
+ <td>Yes</td>
</tr>
<tr>
<td>Jakarta Commons Digester</td>
<td>commons-digester.jar</td>
<td>1.6</td>
+ <td>Yes</td>
</tr>
<tr>
<td>Jakarta Commons Discovery</td>
<td>commons-discovery-0.2.jar</td>
<td>0.2</td>
+ <td>Yes</td>
</tr>
<tr>
<td>Jakarta Commons EL</td>
<td>commons-el.jar</td>
<td>1.0</td>
+ <td>Yes</td>
</tr>
<tr>
<td>Jakarta Commons File Upload</td>
<td>commons-fileupload.jar</td>
<td>1.0</td>
+ <td>Yes</td>
</tr>
<tr>
<td>Jakarta Commons Logging</td>
<td>commons-logging.jar</td>
<td>1.0.4</td>
+ <td>Yes</td>
</tr>
<tr>
<td>Jakarta Commons ORO (Text Processing)</td>
<td>jakarta-oro.jar</td>
<td>2.0.7</td>
+ <td>Yes</td>
</tr>
<tr>
<td>Jakarta Commons Validator</td>
<td>commons-validator.jar</td>
<td>1.1.4</td>
+ <td>Yes</td>
</tr>
<tr>
<td>JSR 173 (Streaming API for XML)</td>
<td>jsr173_1.0_api.jar</td>
<td>1.0</td>
+ <td>Yes</td>
</tr>
<tr>
<td>JSTL</td>
<td>jstl.jar</td>
<td>1.1.0-D13</td>
+ <td>Yes (when using JSTL tags)</td>
</tr>
<tr>
<td>JSTL</td>
<td>standard.jar</td>
<td>1.1.0-D13</td>
+ <td>Yes for JSTL support; no otherwise</td>
</tr>
<tr>
<td>Log4J</td>
<td>log4j-1.2.8.jar</td>
<td>1.2.8</td>
+ <td>No</td>
</tr>
<tr>
<td>Struts</td>
<td>struts.jar</td>
<td>1.2.7</td>
+ <td>Yes</td>
</tr>
<tr>
<td>XMLBeans</td>
<td>apache-xbean.jar</td>
<td>2.0.0</td>
+ <td>Yes</td>
</tr>
</table>
-
</section>
-
</section>
-
<section id="building">
<title>Building</title>
-
<p>
This section assumes that you are using <code>project/WEB-INF/src/build.xml</code>, which should like the
file found at <em>beehive-home</em><code>/samples/netui-blank/WEB-INF/src/build.xml</code>. (For
- instructions on starting with the template web project, see
- <a href="site:netui-blank">Project: NetUI</a>.)
+ instructions on starting with the template web project, see <a href="site:netui-blank">Project: NetUI</a>.)
</p>
-
<p>
The build.xml file depends on properties that you have set up in the file
<code>project/WEB-INF/src/build.xml</code>. You need to provide values for the following properties:
</p>
-
<ul>
<li><code>beehive.home</code>: points to the top-level directory of your Beehive installation</li>
<li><code>servlet-api.jar</code>: for Tomcat, this value is $CATALINA_HOME/common/lib/servlet-api.jar</li>
@@ -220,9 +222,7 @@
http://some.domain/<em>context.path</em>/someDirectory), and (2) the name of the compiled WAR file.
</li>
</ul>
-
<p>An example <code>build.properties</code> file appears below.</p>
-
<source>
beehive.home=/apache/apache-beehive-1.0
servlet-api.jar=${os.CATALINA_HOME}/common/lib/servlet-api.jar
@@ -233,7 +233,6 @@
following variables are set: <code>ANT_HOME</code>, <code>JAVA_HOME</code>,
and <code>CATALINA_HOME</code>.
</p>
-
<table>
<tr>
<th>Variable</th>
@@ -252,7 +251,6 @@
<td>Top level of the installed Tomcat server (optional; required only if you use Tomcat).</td>
</tr>
</table>
-
<p>
Once these variables are set correctly, you can build the project and generate a deployable <code>war</code>
file using the following command (assuming you are in the <code>project</code> directory):
@@ -262,12 +260,9 @@
This cleans the project, builds it, and packages it into a deployable unit (<code>myWebApp.war</code>, in
this case, since <code>context.path=myWebApp</code> in <code>build.properties</code>).
</p>
-
</section>
-
<section id="deploying">
<title>Deploying the Web Project</title>
-
<p>
To deploy your project, you have two options:
</p>
@@ -280,7 +275,6 @@
deployed as a webapp, you can see changes by running <code>ant -f WEB-INf/src/build.xml build</code>, then
redeploying the webapp.
</note>
-
<p>
Instructions for deploying a project vary from server to server. One way to deploy using Tomcat is to
hit the following URL in your browser:
@@ -290,25 +284,20 @@
An example <em>context-path</em> might be <code>/myWebApp</code>, and an example URL (on Windows) might be
<code>file:///C:/temp/project</code>.
</p>
-
<note>
The Tomcat instructions assume that you have created the <code>manager</code> role in the configuration file
<code>$CATALINA_HOME/conf/tomcat-users.xml</code>.
</note>
</section>
-
<section id="next">
<title>Next...</title>
-
<p>
Now that you've built and deployed a project, you can see how easy it is to modify the flow between pages.
</p>
-
<ul>
<li><a href="site:pageflow_altering">Altering a Page Flow</a></li>
</ul>
</section>
-
<section id="alternateProjectLayouts">
<title>Alternate Project Layouts</title>
<p>
@@ -330,107 +319,107 @@
Here, the full webapp is built to project/build/webapp, while source and content directories are
untouched. The build.xml file would look like this:
</p>
- <source>
-<project name="AlternateProjectModel" default="usage" basedir=".">
+ <source><![CDATA[
+<project name="AlternateProjectModel" default="usage" basedir=".">
- <property environment="os"/>
- <property file="${basedir}/build.properties"/>
+ <property environment="os"/>
+ <property file="${basedir}/build.properties"/>
- <import file="${beehive.home}/beehive-imports.xml"/>
- <import file="${beehive.home}/ant/beehive-tools.xml"/>
+ <import file="${beehive.home}/beehive-imports.xml"/>
+ <import file="${beehive.home}/ant/beehive-tools.xml"/>
- <property name="build.dir" location="${basedir}/build"/>
- <property name="build.webapp.dir" location="${build.dir}/webapp"/>
- <property name="src.dir" location="${basedir}/src"/>
- <property name="src.java.dir" location="${src.dir}/java"/>
- <property name="src.content.dir" location="${src.dir}/web"/>
- <property name="webinf.dir" location="${build.webapp.dir}/WEB-INF"/>
- <property name="build.classes.dir" location="${webinf.dir}/classes"/>
- <property name="tmp.sourcegen.dir" value="${build.dir}/tmpbeansrc"/>
-
- <!-- Define the classpath used to build the webapp -->
- <path id="webapp.build.classpath">
- <pathelement location="${servlet-api.jar}"/>
- <pathelement location="${jsp-api.jar}"/>
- <pathelement location="${build.classes.dir}"/>
- <fileset dir="${webinf.dir}/lib">
- <include name="*.jar"/>
- </fileset>
- </path>
-
- <!-- Define the sourcepath used to build the webapp -->
- <path id="webapp.build.sourcepath">
- <pathelement location="${src.java.dir}"/>
- </path>
-
- <target name="deploy-beehive" description="Copy the Beehive NetUI rutime into the target webapp">
- <mkdir dir="${build.webapp.dir}"/>
- <deploy-netui webappDir="${build.webapp.dir}"/>
- </target>
-
- <target name="build" depends="deploy-beehive" description="Build the webapp">
- <available property="src.dir.available" file="${src.dir}" type="dir"/>
- <fail unless="src.dir.available" message="Can't find the source directory ${src.dir}"/>
+ <property name="build.dir" location="${basedir}/build"/>
+ <property name="build.webapp.dir" location="${build.dir}/webapp"/>
+ <property name="src.dir" location="${basedir}/src"/>
+ <property name="src.java.dir" location="${src.dir}/java"/>
+ <property name="src.content.dir" location="${src.dir}/web"/>
+ <property name="webinf.dir" location="${build.webapp.dir}/WEB-INF"/>
+ <property name="build.classes.dir" location="${webinf.dir}/classes"/>
+ <property name="tmp.sourcegen.dir" value="${build.dir}/tmpbeansrc"/>
+
+ <!-- Define the classpath used to build the webapp -->
+ <path id="webapp.build.classpath">
+ <pathelement location="${servlet-api.jar}"/>
+ <pathelement location="${jsp-api.jar}"/>
+ <pathelement location="${build.classes.dir}"/>
+ <fileset dir="${webinf.dir}/lib">
+ <include name="*.jar"/>
+ </fileset>
+ </path>
+
+ <!-- Define the sourcepath used to build the webapp -->
+ <path id="webapp.build.sourcepath">
+ <pathelement location="${src.java.dir}"/>
+ </path>
+
+ <target name="deploy-beehive" description="Copy the Beehive NetUI rutime into the target webapp">
+ <mkdir dir="${build.webapp.dir}"/>
+ <deploy-netui webappDir="${build.webapp.dir}"/>
+ </target>
+
+ <target name="build" depends="deploy-beehive" description="Build the webapp">
+ <available property="src.dir.available" file="${src.dir}" type="dir"/>
+ <fail unless="src.dir.available" message="Can't find the source directory ${src.dir}"/>
- <!--
+ <!--
this directory needs to get whacked before every build so
that control interface repackagings don't cause stale
files to be compiled
- -->
- <delete dir="${tmp.sourcegen.dir}" includeEmptyDirs="true"/>
+ -->
+ <delete dir="${tmp.sourcegen.dir}" includeEmptyDirs="true"/>
- <mkdir dir="${build.classes.dir}"/>
+ <mkdir dir="${build.classes.dir}"/>
- <!-- compile XSDs -->
- <build-schemas srcdir="${src.dir}/schemas" destdir="${build.classes.dir}"/>
+ <!-- compile XSDs -->
+ <build-schemas srcdir="${src.dir}/schemas" destdir="${build.classes.dir}"/>
- <!-- compile controls -->
- <build-controls srcdir="${src.java.dir}"
+ <!-- compile controls -->
+ <build-controls srcdir="${src.java.dir}"
destdir="${build.classes.dir}"
tempdir="${tmp.sourcegen.dir}"
- classpathref="webapp.build.classpath"/>
+ classpathref="webapp.build.classpath"/>
- <!--
+ <!--
compile page flows (note: controller source files live inside the web content
directory, but they are not included in the built webapp.)
- -->
- <build-pageflows srcdir="${src.content.dir}"
+ -->
+ <build-pageflows srcdir="${src.content.dir}"
webcontentdir="${src.content.dir}"
weboutputdir="${build.webapp.dir}"
classoutputdir="${build.classes.dir}"
tempdir="${tmp.sourcegen.dir}"
classpathref="webapp.build.classpath"
- sourcepathref="webapp.build.sourcepath"/>
+ sourcepathref="webapp.build.sourcepath"/>
- <!-- Copy the content to the build directory. -->
- <copy todir="${build.webapp.dir}">
- <fileset dir="${src.content.dir}">
- <include name="**"/>
- <exclude name="**/*.java"/>
- </fileset>
- </copy>
- </target>
-
- <target name="clean" description="Clean the webapp">
- <delete dir="${build.dir}" includeEmptyDirs="true"/>
- </target>
-
- <target name="war" description="Build a compressed WAR file that can be deployed to an application container">
- <property name="archive.dir" value="${build.webapp.dir}/.."/>
-
- <!-- this does *not* exclude source from the archive -->
- <war destfile="${archive.dir}/${context.path}.war" webxml="${webinf.dir}/web.xml">
- <fileset dir="${webinf.dir}">
- <exclude name="web.xml"/>
- </fileset>
- </war>
- </target>
-
- <target name="usage" description="Print usage information for this build file">
- <em>(same as in netui-blank)</em>
- </target>
+ <!-- Copy the content to the build directory. -->
+ <copy todir="${build.webapp.dir}">
+ <fileset dir="${src.content.dir}">
+ <include name="**"/>
+ <exclude name="**/*.java"/>
+ </fileset>
+ </copy>
+ </target>
+
+ <target name="clean" description="Clean the webapp">
+ <delete dir="${build.dir}" includeEmptyDirs="true"/>
+ </target>
+
+ <target name="war" description="Build a compressed WAR file that can be deployed to an application container">
+ <property name="archive.dir" value="${build.webapp.dir}/.."/>
+
+ <!-- this does *not* exclude source from the archive -->
+ <war destfile="${archive.dir}/${context.path}.war" webxml="${webinf.dir}/web.xml">
+ <fileset dir="${webinf.dir}">
+ <exclude name="web.xml"/>
+ </fileset>
+ </war>
+ </target>
+
+ <target name="usage" description="Print usage information for this build file">
+ todo
+ </target>
-</project>
+</project>]]>
</source>
<p>
Note that the Page Flow controller source files live among web content, e.g.,
@@ -454,7 +443,6 @@
project/src/pageflow.
</p>
</section>
-
</body>
<footer>
<legal>