Jetty--Quick Start

本文提供Jetty 6的快速安装与运行指南,包括下载、配置及基本测试步骤。适用于J2SE 1.4及以上版本,可在支持该环境的任意操作系统上运行。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 

http://www.ibm.com/developerworks/cn/web/wa-lo-jetty/

 

Jetty Quick Start

http://docs.codehaus.org/display/JETTY/Quick+Start

 

The following provides quick instructions for downloading, installing, and running the binary version of Jetty 6. The table at the end of this page provides links to instructions for other versions of Jetty.

Prerequisites

Hardware:
  • 6 MB of disk space for Jetty source, 24 MB for binaries, 26 MB for Hightide
Operating System:
  • Any operating system that supports J2SE 1.4 or greater.
Environment

Download and Unpack

  1. Download the latest Jetty from Eclipse or older versions from the codehaus . From the download site, select the version you want and follow the prompts to Save it on your system.
  2. Unzip it into a directory of your choice. Now it is ready to start running.

Starting Jetty

To start Jetty open a command shell, go to your Jetty installation directory, and type:

java -jar start.jar

This starts Jetty running on port 8080.

Jetty will not start if another process is using port 8080. The port number can be changed by editing the $JETTY_HOME/etc/jetty.xml file. Please see the Setting Jetty's Port section below or for more details see Configuring Jetty .

Stopping Jetty

From the command shell where Jetty is running type: <ctrl-c> .

Testing Jetty

When Jetty starts it deploys a test web application on port 8080 (or whatever port you specified). To check if Jetty is running properly navigate to the test URL from a browser. For example:

Note: If you started Jetty on another host, substitute that host name for localhost . If you used a different port number you will also need to change 8080 to the correct number.

Setting Jetty's Port

To change Jetty's default port, edit $JETTY_HOME/etc/jetty.xml and change the port number in this line, then start Jetty:

<Set name="port"

>

<SystemProperty name="jetty.port"

 default="8080"

/>

</Set>

Alternatively you can set the port on the command line. Please see Configuring Jetty for more details.

Configuring Jetty

http://docs.codehaus.org/display/JETTY/Configuring+Jetty

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值