转自:http://www.eclipse.org/webtools/initial-contribution/IBM/evalGuides/ServerToolsEval.html

Server Tools Evaluation Guide

1.0 Introduction

The Server Tools component provides a comprehensive framework for supporting servers within Eclipse, as well as anumber of supporting tools. The initial contribution contains support for several versions of Apache Tomcat, an internalWeb browser for viewing Web pages inside the IDE, and a TCP/IP monitor for observing data flow between a client and aserver.

The Server Tools contribution consists of four separate components:

  • Web Browser - Support for an internal (hosted within the IDE) Web browser and launching external browsers.
  • 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.
  • 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.
  • Apache Tomcat server support - Support for running and debugging on Tomcat v3.2, v4.0, v4.1, and v5.0.

This guide will step you through each one of these components and point out many of the useful features along theway. There are two scenarios - the first scenario will highlight the TCP/IP Monitor and the Web Browser support, and thesecond scenario will involve debugging a JSP file on Tomcat v5.0.

2.0 Getting Started

There is no setup required to run the first scenario. To run the second scenario, you will need to install twothings before you begin:

  • 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 fromhttp://jakarta.apache.org. 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.
  • 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.

3.0 Quick Tour

3.1 Scenario 1 - TCP/IP Monitor and Web Browser

In this scenario, we'll take a look at the TCP/IP Monitor and Web Browser support, and then use the monitor toinspect traffic between the Web browser and an external Web site.

  1. Go to Window > Preferences and then select Web Browser.
  2. 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.

  3. Using this page, you can edit the settings for each browser (see below), add new browsers, or do a search through a particular directory.

  4. Select the TCP/IP Monitor preferences on the left.
  5. Click Add to add a new monitor. Type "www.eclipse.org" in the Host name: field and click OK.

  6. Click Start and then OK to exit the preferences dialog.
  7. 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.

  8. Click on the "world" icon () 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.
  9. Type in "http://localhost/" in the location field and hit Enter.
  10. 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.

  11. 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.
  12. Close the Web browser and the TCP/IP monitor views.

3.2 Scenario 2 - Debugging a JSP on Tomcat v5.0

In this scenario, we'll create a new Web project and JSP file, and then debug the JSP on Tomcat v5.0. If you areusing another version of Tomcat, you can follow along with all of the steps, but the debugger will not stop at thebreakpoint in the JSP.

  1. Go to create a new project and select Web > Dynamic Web Project. Click Next.

  2. 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.
  3. The target server field is blank if you have not used this workspace before. Click New... to create a new server runtime.
  4. Select your version of Tomcat from the list, and click Next.

  5. Use the Browse... button to locate the Tomcat installation directory (the directory in which you unzipped Tomcat).
  6. 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...
  7. 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.
  8. 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)

  9. 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.

  10. Click OK again, and make sure that MyJDK is selected in the JRE: field. Click Finish.

  11. You should now be back at the Web project wizard. Uncheck the Add module to an EAR project checkbox, since Tomcat does not support EAR projects. The wizard should now look like this:

  12. Click Finish. The new Web project will be created in the workspace.
  13. Create a new file, called today.jsp. The JSP editor will be automatically opened up.
  14. Type
    Today is: <%= new java.util.Date().toString() %>

    in the editor and save.

  15. Double click in the margin by the text you just entered to set a breakpoint.

  16. Close the editor.
  17. Right click on the today.jsp file in the Navigator and choose Debug > Debug on Server.

  18. The server selection wizard is empty because there are no servers defined. Click New Server... and select your version of Tomcat. Click Finish.

  19. Ensure that the server is selected and click Finish.

  20. When Eclipse prompts you to switch to the Debug perspective, click Yes.
  21. 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.

  22. The Web browser will open, displaying the results of the JSP page:

TCP/IP Monitor相关推荐

  1. 08_使用TCP/IP Monitor监视SOAP协议

    [SOAP定义] SOAP   简单对象访问协议,基于http传输xml数据,soap协议体是xml格式. SOAP   是一种网络通信协议 SOAP   即Simple Object Access ...

  2. IntelliJ IDEA for Mac下载、安装、使用TunnelliJ插件(一种TCP/IP Monitor)

    文章目录 下载和安装 TunnelliJ 使用 TunnelliJ IntelliJ IDEA 要使用类似于 Eclipse 的 TCP/IP Monitor,需要下载第三方插件,推荐使用 Tunne ...

  3. MyEclipse 的 TCP/IP Monitor 的使用

    文章目录 步骤 1:新建 web02 工程 步骤 2:在 WebRoot 下创建 add_employee.html 步骤 3:部署项目 步骤 4:启动服务器 步骤 5:打开 TCP/IP Monit ...

  4. 利用MyEclipse的TCP/IP Minitor捕获Http的请求和响应数据包

    打开TCP/IP Monitor视图,操作如下: Window->Show View->Other->MyEclipse Common->TCP/IP Monitor-> ...

  5. TCP/IP 协议栈及 OSI 参考模型详解--云平台技术栈04

    导读:之前发布了云平台技术栈(ps:点击可查看),本文主要说一下其中的tcp/ip和网络! 来源:王东裕 http://wangdy.blog.51cto.com/3845563/1588379 OS ...

  6. 在Linux下配置TCP/IP

    关键文件和脚本 网络接口初始化的实际过程(有时也称做"启动接口")是由一组配置文件和脚本控制的,这些文件和脚本大多数在/etc 目录下.这些配置文件告诉 Linux 它的 IP 地 ...

  7. TCP,IP数据包结构

    TCP/IP协议中各层的数据报结构是一个比较抽象的内容,大家在日常学习过程中往往难以理解和掌握,常常是死记硬背把它记住了事.本文首先利用Sniffer工具捕获了FTP命令操作过程中的所有数据包,然后对 ...

  8. TCP/IP 协议栈及 OSI 参考模型详解

    TCP/IP 协议栈及 OSI 参考模型详解 转载地址:http://www.codeceo.com/article/tcp-ip-osi-model.html OSI参考模型 OSI RM:开放系统 ...

  9. Cisco测试命令和TCP/IP连接故障处理

    Cisco测试命令和TCP/IP连接故障处理 一.故障处理命令 1.show命令: 1) 全局命令: show version :显示系统硬件和软件版本.DRAM.Flash show startup ...

最新文章

  1. tp5 控制器不存在_使用服务器管理器将域控制器降级
  2. sql server 里面怎么支持数字使用双引号_国查:用中文编写SQL
  3. 二叉树查找后继节点(即中序遍历情况下的这个节点的下一个) Python实现
  4. Unity可编程渲染管线系列(八)全局光照(直接光照)
  5. 性能测试方案(计划)模板
  6. 高速公路坐标高程计算程序开发之后记
  7. 在线答题助手c语言源码,开源的在线答题小程序
  8. 京瓷m1025维修模式进不去_京瓷1025打印机无法扫描怎么处理?
  9. 252个基本词根详解
  10. php小型购物网站,PHP实现一个多功能购物网站
  11. 程序员相亲大曝光 女方:做底层架构,什么时候升嘞!emmmm
  12. powerbi 线性回归_精选 | 实用炫酷的Power BI自定义图表
  13. 阿克曼前轮转向车gazebo模型
  14. uniapp小程序实现开屏页
  15. 关于生活、职场的犀利、讽刺言论,网友们都是奇才!
  16. H5制作视频网页的架构
  17. 微信公众号的缩略图/封面图下载方法详细介绍
  18. WuThreat身份安全云-TVD每日漏洞情报-2022-12-22
  19. 介绍qmake2cmake
  20. 输入一个不为0的整数,判断它是正数还是负数,并且计算正负数的个数

热门文章

  1. 【转载】详细制作form的方法
  2. Excel 2010 VBA 入门 124 日期选择控件
  3. 2019上海米其林指南榜单出炉 | 附全部名单、地址、人均消费
  4. 微信公众平台Token验证
  5. 电商十大暴利产品排名
  6. 灵光一闪!帮你使用Vue,搞定无法解决的“动态挂载”
  7. 如何在微信小程序的页面间传递数据?
  8. opT型电阻网络分析
  9. 【踩坑合辑】7.14
  10. 混合硬盘计算机,混合固态硬盘