| <html> |
| <head> |
| <meta |
| http-equiv="Content-Type" |
| content="text/html; charset=Cp1252"> |
| <meta |
| http-equiv="Content-Style-Type" |
| content="text/css"> |
| <link |
| href="../theme/Master.css" |
| rel="stylesheet" |
| type="text/css"> |
| <title>Server Tools Evaluation Guide</title> |
| </head> |
| <body> |
| <h1>Server Tools Evaluation Guide</h1> |
| <h2>1.0 Introduction</h2> |
| <p>The Server Tools component provides a comprehensive framework for supporting servers within Eclipse, as well as a |
| number of supporting tools. The initial contribution contains support for several versions of Apache Tomcat, an internal |
| Web browser for viewing Web pages inside the IDE, and a TCP/IP monitor for observing data flow between a client and a |
| server.</p> |
| <p>The Server Tools contribution consists of four separate components:</p> |
| <ul> |
| <li>Web Browser - Support for an internal (hosted within the IDE) Web browser and launching external browsers.</li> |
| <li>TCP/IP Monitor - A TCP/IP "tunnel" that sits between a client and server and allows you to monitor the |
| traffic between them. The TCP/IP Monitor is also the basis for the WS-I SOAP monitor.</li> |
| <li>Server Tools framework - A generic framework for adding server support to Eclipse. Provides a set of common |
| actions and wizards, and a Servers view and preferences to manage servers. It provides a number of extension points |
| that allow developers to extend the servers that are supported, and API to allow other plugins to access server |
| information and control servers.</li> |
| <li>Apache Tomcat server support - Support for running and debugging on Tomcat v3.2, v4.0, v4.1, and v5.0.</li> |
| </ul> |
| <p>This guide will step you through each one of these components and point out many of the useful features along the |
| way. There are two scenarios - the first scenario will highlight the TCP/IP Monitor and the Web Browser support, and the |
| second scenario will involve debugging a JSP file on Tomcat v5.0.</p> |
| <h2>2.0 Getting Started</h2> |
| <p>There is no setup required to run the first scenario. To run the second scenario, you will need to install two |
| things before you begin:</p> |
| <ul> |
| <li>To run a Web project on Apache Tomcat, you'll need to download and unzip a copy of the Tomcat server. You |
| can download Tomcat from <a href="http://jakarta.apache.org">http://jakarta.apache.org</a>. Click on Downloads > |
| Binaries on the left hand side and download any version of Tomcat v3.2.x, v4.0.x, v4.1.x, or v5.0.x. For JSP |
| debugging support, choose Tomcat v5.0.x.</li> |
| <li>To run JavaServer Pages on Tomcat, you will need a full JDK (not just a JRE). If you do not already use a |
| JDK to run Eclipse, you will need to download and install one separately.</li> |
| </ul> |
| <h2>3.0 Quick Tour</h2> |
| <h3>3.1 Scenario 1 - TCP/IP Monitor and Web Browser</h3> |
| <p>In this scenario, we'll take a look at the TCP/IP Monitor and Web Browser support, and then use the monitor to |
| inspect traffic between the Web browser and an external Web site.</p> |
| <ol> |
| <li>Go to Window > Preferences and then select Web Browser.</li> |
| <li>This page displays the Web browsers that have been found on your machine, and allows you to add and remove |
| them from the list. The checked Web browser is the one that will be used by the tools. On most operating systems |
| "Internal Web browser" will be checked by default.</li> |
| <p><img |
| src="ServerToolsEval_files/browserPrefs.gif" |
| width="635" |
| height="539" |
| alt="" /></p> |
| <li>Using this page, you can edit the settings for each browser (see below), add new browsers, or do a search |
| through a particular directory.</li> |
| <p><img |
| src="ServerToolsEval_files/editBrowser.gif" |
| width="432" |
| height="176" |
| alt="" /></p> |
| <li>Select the TCP/IP Monitor preferences on the left.</li> |
| <li>Click Add to add a new monitor. Type "www.eclipse.org" in the Host name: field and click OK.</li> |
| <p><img |
| src="ServerToolsEval_files/monitorPrefs.gif" |
| width="635" |
| height="539" |
| alt="" /></p> |
| <li>Click Start and then OK to exit the preferences dialog.</li> |
| <li>Switch to the Server perspective. Note the Servers view (a server has been installed here to show the menu |
| actions) that shows the status of all installed servers and allows you to start, stop, and publish to any server.</li> |
| <p><img |
| src="ServerToolsEval_files/serversView.gif" |
| width="875" |
| height="657" |
| alt="" /></p> |
| <li>Click on the "world" icon (<img |
| src="ServerToolsEval_files/internal_browser.gif" |
| width="16" |
| height="16" |
| alt="" />) on the toolbar. This will open your preferred Web browser. If the Internal Web Browser was checked in |
| the preferences, it will open. Take this opportunity to get familiar with the internal browser.</li> |
| <li>Type in "http://localhost/" in the location field and hit Enter.</li> |
| <li>The TCP/IP monitor view should appear below, and fill up with the traffic between your Web browser and |
| Eclipse.org. When you select each request in the tree at the top left, information about the request/response is |
| shown, the bottom left of the view will display the HTTP request that was made to www.eclipse.org, and the bottom |
| right will show each response.</li> |
| <p><img |
| src="ServerToolsEval_files/monitorBrowser.gif" |
| width="875" |
| height="657" |
| alt="" /></p> |
| <li>Select /images/EclipseBannerPic.jpg from the tree. The response output isn't very useful in this case |
| because the content is a JPG image. In the response section (bottom right), select Image View from the combo box. |
| The JPG should now be visible.</li> |
| <li>Close the Web browser and the TCP/IP monitor views.</li> |
| </ol> |
| <h3>3.2 Scenario 2 - Debugging a JSP on Tomcat v5.0</h3> |
| <p>In this scenario, we'll create a new Web project and JSP file, and then debug the JSP on Tomcat v5.0. If you are |
| using another version of Tomcat, you can follow along with all of the steps, but the debugger will not stop at the |
| breakpoint in the JSP.</p> |
| <ol> |
| <li>Go to create a new project and select Web > Dynamic Web Project. Click Next.</li> |
| <p><img |
| src="ServerToolsEval_files/newProject.gif" |
| width="500" |
| height="500" |
| alt="" /></p> |
| <li>Type My Web as the Web project name. If you want to use an older version of Tomcat, select a supported J2EE |
| Web version for your version of Tomcat. If in doubt as to what version(s) your Tomcat server supports, choose 2.2.</li> |
| <li>The target server field is blank if you have not used this workspace before. Click New... to create a new |
| server runtime.</li> |
| <li>Select your version of Tomcat from the list, and click Next.</li> |
| <p><img |
| src="ServerToolsEval_files/newRuntime.gif" |
| width="438" |
| height="422" |
| alt="" /></p> |
| <li>Use the Browse... button to locate the Tomcat installation directory (the directory in which you unzipped |
| Tomcat).</li> |
| <li>Tomcat requires a JDK to be able to compile JSP files. If you are using a JRE to run Eclipse, you'll need |
| to install a JDK now. Click Installed JREs...</li> |
| <li>Click Add... to create a new Installed JRE. Type MyJDK in the JRE Name: field and use the first Browse... |
| button to choose the directory in which you have a JDK. The default system libraries list at the bottom of the |
| dialog should automatically fill up.</li> |
| <li>If you are using an IBM JDK, type -Xj9 in the Default VM Arguments: field to allow JSP debugging. (In |
| either case, JSP debugging is only supported by Tomcat v5.0)</li> |
| <p><img |
| src="ServerToolsEval_files/JDKSettings.gif" |
| width="486" |
| height="443" |
| alt="" /></p> |
| <li>Click OK to get back to the Installed JRE preferences. Your new JDK should now be listed. You do not need |
| to check the JDK to have the Web project compile against the Tomcat JDK - when the project is created it will |
| automatically be set to compile against the correct JDK and Tomcat libraries.</li> |
| <p><img |
| src="ServerToolsEval_files/installedJREs.gif" |
| width="635" |
| height="539" |
| alt="" /></p> |
| <li>Click OK again, and make sure that MyJDK is selected in the JRE: field. Click Finish.</li> |
| <p><img |
| src="ServerToolsEval_files/tomcatRuntime.gif" |
| width="438" |
| height="422" |
| alt="" /></p> |
| <li>You should now be back at the Web project wizard. Uncheck the <b>Add module to an EAR project</b> checkbox, |
| since Tomcat does not support EAR projects. The wizard should now look like this:</li> |
| <p><img |
| src="ServerToolsEval_files/newWebProject.gif" |
| width="503" |
| height="504" |
| alt="" /></p> |
| <li>Click Finish. The new Web project will be created in the workspace.</li> |
| <li>Create a new file, called today.jsp. The JSP editor will be automatically opened up.</li> |
| <li>Type <pre>Today is: <%= new java.util.Date().toString() %></pre> in the editor and save.</li> |
| <li>Double click in the margin by the text you just entered to set a breakpoint.</li> |
| <p><img |
| src="ServerToolsEval_files/JSP.gif" |
| width="875" |
| height="657" |
| alt="" /></p> |
| <li>Close the editor.</li> |
| <li>Right click on the today.jsp file in the Navigator and choose Debug > Debug on Server.</li> |
| <p><img |
| src="ServerToolsEval_files/debugOnServer.gif" |
| width="875" |
| height="657" |
| alt="" /></p> |
| <li>The server selection wizard is empty because there are no servers defined. Click New Server... and select |
| your version of Tomcat. Click Finish.</li> |
| <p><img |
| src="ServerToolsEval_files/newServer.gif" |
| width="508" |
| height="521" |
| alt="" /></p> |
| <li>Ensure that the server is selected and click Finish.</li> |
| <p><img |
| src="ServerToolsEval_files/serverSelection.gif" |
| width="438" |
| height="517" |
| alt="" /></p> |
| <li>When Eclipse prompts you to switch to the Debug perspective, click Yes.</li> |
| <li>In a few seconds, the JSP file will stop in the debugger and the JSP editor will be opened. From here, you |
| can inspect the variables and make changes to the JSP file. Click on the Resume button in the Debug view to run the |
| JSP file.</li> |
| <p><img |
| src="ServerToolsEval_files/debugJSP.gif" |
| width="875" |
| height="657" |
| alt="" /></p> |
| <li>The Web browser will open, displaying the results of the JSP page:</li> |
| <p><img |
| src="ServerToolsEval_files/browserJSP.gif" |
| width="875" |
| height="657" |
| alt="" /></p> |
| </ol> |
| <h2>4.0 Provide Feedback to Us</h2> |
| <p>We encourage development/design feed back on the <a href="https://dev.eclipse.org/mailman/listinfo/wtp-dev">wtp-dev</a> |
| mailing list. You can subscribe to the list via <a href="https://dev.eclipse.org/mailman/listinfo/wtp-dev">this link</a>.<br> |
| <br> |
| For usage questions, discussion of bugs, and strange behaviour please post to the eclipse.webtools newsgroup. |
| Information on the Web Tools Platform newsgroup can be found <a href="http://www.eclipse.org/newsgroups/index.html">here</a>.</p> |
| </body> |
| </html> |