<?xml version="1.0" encoding="utf-8"?> | |
<!--Arbortext, Inc., 1988-2006, v.4002--> | |
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" | |
"../../dtd/task.dtd"> | |
<task id="creatinganapachetomcatserver" xml:lang="en-us"> | |
<title>Creating an Apache Tomcat server and Web project</title> | |
<shortdesc>If you plan to create a Web service that uses Apache Jakarta Tomcat | |
as its server, Tomcat must be installed and a server created before you begin | |
creating your Web service.</shortdesc> | |
<prolog><metadata> | |
<keywords><indexterm keyref="ttomcatserv|1|AxisruntimeenvironmentcreatinganApacheTomcatserver" | |
status="unchanged">Axis runtime environment<indexterm>Apache Tomcat</indexterm></indexterm> | |
<indexterm keyref="ttomcatserv|2|TomcatservercreatingserversforWebservices" | |
status="unchanged">Apache Tomcat<indexterm>servers for Web services</indexterm></indexterm> | |
<indexterm keyref="ttomcatserv|3|WebservicescreatinganApacheTomcatserver" | |
status="unchanged">Web services<indexterm>creating an Apache Tomcat server</indexterm></indexterm> | |
</keywords> | |
</metadata></prolog> | |
<taskbody> | |
<prereq>Install Apache Jakarta Tomcat from this URL: <xref href="http://jakarta.apache.org/tomcat" | |
scope="external">http://jakarta.apache.org/tomcat</xref></prereq> | |
<context>Once you have installed the server, create a Tomcat server in the | |
workbench by doing the following: </context> | |
<steps> | |
<step><cmd>From the File menu, select <uicontrol>New > Other > Server > Server | |
> Next</uicontrol>.</cmd></step> | |
<step><cmd>Select Tomcat v 3.x, 4.x, v5.x, or 6.x as the server type, electing | |
the correct version of Tomcat for your install, and click <uicontrol>Next</uicontrol>.</cmd> | |
</step> | |
<step><cmd>On the Tomcat server page:</cmd> | |
<substeps> | |
<substep><cmd>Enter a server name.</cmd></substep> | |
<substep><cmd>Specify where Tomcat is installed.</cmd></substep> | |
<substep><cmd>Click <uicontrol>Installed JREs</uicontrol>, click <uicontrol>Add</uicontrol>, | |
and enter the appropriate information for the JDK you plan to use for Tomcat. | |
For example, for Tomcat v5.0 the JRE name would be jdk141 and the JRE home | |
would be the home directory for JDK 1.4.1. Click <uicontrol>OK</uicontrol> twice | |
once you have entered this information. Ensure that the newly added JDK is | |
now selected in the JRE field of the Tomcat server page. Note that if you | |
point the server at a JRE rather than a JDK the JSPs will not properly compile | |
and will not be able to run on the Tomcat server.</cmd></substep> | |
</substeps> | |
</step> | |
<step><cmd>Click <uicontrol>Finish</uicontrol>.</cmd><stepresult> To see the | |
server you have created in the workspace, from the Window menu select <uicontrol>Show | |
view > Other > Server > Servers > Ok.</uicontrol> </stepresult></step> | |
</steps> | |
<example><p>To build a dynamic Web project that points to the Tomcat server | |
that you have created:</p><ol> | |
<li>Create the service Web project by selecting <uicontrol>New > Dynamic Web | |
project</uicontrol>. Enter the following information: <ul> | |
<li>Project Name: enter a project name</li> | |
<li>Target runtime: Tomcat server v3.x, 4.x, 5.x, or 6.0 depending on the | |
version you installed. If it is not listed, click New and browse to the location | |
where it is installed.</li> | |
<li>Ensure that <uicontrol>Add project to an EAR</uicontrol> is <i>not</i> selected.</li> | |
</ul></li> | |
<li>Click <uicontrol>Finish</uicontrol>.</li> | |
<li>To associate the project with the server, right-click the Tomcat server | |
you created in the Server view and select <uicontrol>Add and remove projects</uicontrol>. | |
Select the service and client projects from the Available projects list and | |
click <uicontrol>Add</uicontrol>. </li> | |
</ol></example> | |
</taskbody> | |
</task> |