Chinaunix首页 | 论坛 | 博客
  • 博客访问: 221657
  • 博文数量: 67
  • 博客积分: 2510
  • 博客等级: 少校
  • 技术积分: 890
  • 用 户 组: 普通用户
  • 注册时间: 2008-01-17 09:42
文章分类

全部博文(67)

文章存档

2010年(5)

2009年(7)

2008年(55)

我的朋友

分类: Java

2008-08-20 15:19:57

Running Jetty-6.1.x

Running jetty6 is as simple as going to your jetty installion directory and typing:

java -jar start.jar etc/jetty.xml

This will start jetty and deploy a demo webapp available at:

http://localhost:8080/test

Configuration

The part of the runline following -jar start.jar specifies the names of configuration files. These files instruct jetty which ports to listen on, which webapps to deploy, and generally configure all container-related customizable settings. You may have only one configuration file, or you may have many, depending on your needs. More on this later.

The etc/jetty.xml file that is provided in the distribution includes many examples of alternative configuration settings that can be uncommented. For your convenience, this configuration instructs jetty to deploy all webapps found in the webapps directory. Therefore, in order to deploy a new webapp, you need not do anything more than drop your war file or unpacked war file into the webapps directory.

Stopping

Apart from stopping jetty with a cntrl-c in the same terminal window as you started it, you can
start Jetty so that it listens on a local port for stop commands:

java -DSTOP.PORT=8079 -DSTOP.KEY=secret -jar start.jar

The server can then be stopped using a different terminal window on the same machine:

java -DSTOP.PORT=8079 -DSTOP
阅读(897) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~