码迷,mamicode.com
首页 > 其他好文 > 详细

Jetty Deployment Descriptor File

时间:2015-01-10 18:35:08      阅读:323      评论:0      收藏:0      [点我收藏+]

标签:jetty deployment descriptor file

In a default Jetty installation, Jetty scans its $JETTY_HOME/webapps directory for context deployment descriptor files. To deploy a web application using such a file, simply place the file in that directory.

The deployment descriptor file itself is an xml file that configures a WebAppContext class. For a basic installation you probably need to set only two properties:

  • war

  •  the filesystem path to the web application file (or directory)

  • contextPath

  • the context path to use for the web application

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_0.dtd">
 
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
  <Set name="contextPath">/wiki</Set>
  <Set name="war">/opt/myapp/myapp.war</Set>
</Configure>


本文出自 “Frank” 博客,请务必保留此出处http://zengfanhong.blog.51cto.com/8894077/1601504

Jetty Deployment Descriptor File

标签:jetty deployment descriptor file

原文地址:http://zengfanhong.blog.51cto.com/8894077/1601504

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!