| <?xml version="1.0" encoding="UTF-8"?><!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> |
| <meta content="text/html; charset=utf-8" http-equiv="Content-Type" /> |
| <meta name="copyright" content="(C) Copyright 2005" /> |
| <meta name="DC.rights.owner" content="(C) Copyright 2005" /> |
| <meta content="public" name="security" /> |
| <meta content="index,follow" name="Robots" /> |
| <meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' /> |
| <meta content="task" name="DC.Type" /> |
| <meta name="DC.Title" content="Creating an Apache Tomcat server and Web project" /> |
| <meta name="abstract" content="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." /> |
| <meta name="description" content="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." /> |
| <meta content="XHTML" name="DC.Format" /> |
| <meta content="creatinganapachetomcatserver" name="DC.Identifier" /> |
| <meta content="en-us" name="DC.Language" /> |
| <link href="../../org.eclipse.wst.doc.user/commonltr.css" type="text/css" rel="stylesheet" /> |
| <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 > Other > Server > Server |
| > Next</span>.</span></li> |
| |
| <li class="stepexpand"><span>Select Tomcat v 3.x, 4.x or v5.x 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 > Other > Server > Servers > 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 > Web > 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> |
| |
| |
| </body> |
| </html> |