blob: bc99c1acecffb6efa1031a00ebb95b3d58abdc34 [file] [log] [blame]
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
<link rel="stylesheet" type="text/css" href="../../org.eclipse.wst.doc.user/common.css" />
<title>Creating an Apache Tomcat server and Web project</title>
</head>
<body id="creatinganapachetomcatserver"><a name="creatinganapachetomcatserver"><!-- --></a>
<h1 class="topictitle1">Creating an Apache Tomcat server and Web project</h1>
<div><p>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.</p>
<div class="p">Install Apache Jakarta Tomcat from this URL: <a href="http://jakarta.apache.org/tomcat" target="_blank">http://jakarta.apache.org/tomcat</a></div>
<div class="section">Once you have installed the server, create a Tomcat server in the
workbench by doing the following: </div>
<ol><li class="stepexpand"><span>From the File menu, select <span class="uicontrol">New &gt; Other &gt; Server &gt; Server
&gt; Next</span>.</span></li>
<li class="stepexpand"><span>Select Tomcat v 3.x, 4.x or v5.0 as the server type, electing the
correct version of Tomcat for your install, and click <span class="uicontrol">Next</span>.</span></li>
<li class="stepexpand"><span>On the Tomcat server page:</span><ol type="a"><li><span>Enter a server name.</span></li>
<li><span>Specify where Tomcat is installed.</span></li>
<li><span>Click <span class="uicontrol">Installed JREs</span>, click <span class="uicontrol">Add</span>,
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 <span class="uicontrol">OK</span> 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.</span></li>
</ol>
</li>
<li class="stepexpand"><span>Click <span class="uicontrol">Finish</span>.</span> To see the
server you have created in the workspace, from the Window menu select <span class="uicontrol">Show
view &gt; Other &gt; Server &gt; Servers &gt; Ok.</span> </li>
</ol>
<div class="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 <span class="uicontrol">New &gt; Web &gt; Dynamic
Web project</span>. Enter the following information: <ul><li>Web Project: enter a project name</li>
<li>Servlet version: 2.3</li>
<li>Target Server: Tomcat server v3.x, 4.x or 5.x depending on the version
you installed</li>
<li>Ensure that <span class="uicontrol">Add Module to an EAR module</span> is <em>not</em> selected.</li>
</ul>
</li>
<li>Click <span class="uicontrol">Finish</span>.</li>
<li>To associate the project with the server, right-click the Tomcat server
you created in the Server view and select <span class="uicontrol">Add and remove projects</span>.
Select the service and client projects from the Available projects list and
click <span class="uicontrol">Add</span>. </li>
</ol>
</div>
</div>
<div></div>
<p>
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.
</p>
</body>
</html>