Linux(RedHat 5.8)下 安装Jetty 部署 使用
来源:互联网 发布:linux 从u盘导入 编辑:程序博客网 时间:2024/06/05 18:27
Linux(RedHat 5.8)下 安装Jetty 部署 使用
首先需要安装JDK,自行解决
下载jetty安装包http://dist.codehaus.org/jetty/
我下载的是8.1.15
tar -xzvf *.tar.gz
解压完之后,基本就可以用了
webapps下有一些demo的war包
启动jetty服务:java -jar start.jar 默认端口8080
访问http://localhost:8080就可以了
现在开始部署你自己的war包
加入你的war包已经有了,名字是abc.war
那么将该war包放到webapps下面
重新启动jetty
访问http://localhost:8080/abc即可访问
如果你的war包名字很复杂不想修改,但是访问路径时希望简单
你可以复制context目录下的test.xml为XXX.xml 然后修改该文件内容
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
<!-- ==================================================================
Configure and deploy the test web application in $(jetty.home)/webapps/test
Note. If this file did not exist or used a context path other that /test
then the default configuration of jetty.xml would discover the test
webapplication with a WebAppDeployer. By specifying a context in this
directory, additional configuration may be specified and hot deployments
detected.
===================================================================== -->
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- Required minimal context configuration : -->
<!-- + contextPath -->
<!-- + war OR resourceBase -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<Set name="contextPath">/hello</Set>
<Set name="war"><SystemProperty name="jetty.home" default="."/>/webapps/abc-123-def-567.war</Set>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- Optional context configuration -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<Set name="extractWAR">true</Set>
<Set name="copyWebDir">false</Set>
<Set name="defaultsDescriptor"><SystemProperty name="jetty.home" default="."/>/etc/webdefault.xml</Set>
<!-- virtual hosts
<Set name="virtualHosts">
<Array type="String">
<Item>www.myVirtualDomain.com</Item>
<Item>localhost</Item>
<Item>127.0.0.1</Item>
</Array>
</Set>
-->
<!-- disable cookies
<Get name="sessionHandler">
<Get name="sessionManager">
<Set name="usingCookies" type="boolean">false</Set>
</Get>
</Get>
-->
<!-- Non standard error page mapping -->
<!--
<Get name="errorHandler">
<Call name="addErrorPage">
<Arg type="int">500</Arg>
<Arg type="int">599</Arg>
<Arg type="String">/dump/errorCodeRangeMapping</Arg>
</Call>
</Get>
-->
<!-- Add context specific logger
<Set name="handler">
<New id="RequestLog" class="org.eclipse.jetty.server.handler.RequestLogHandler">
<Set name="requestLog">
<New id="RequestLogImpl" class="org.eclipse.jetty.server.NCSARequestLog">
<Set name="filename"><Property name="jetty.logs" default="./logs"/>/test-yyyy_mm_dd.request.log</Set>
<Set name="filenameDateFormat">yyyy_MM_dd</Set>
<Set name="append">true</Set>
<Set name="LogTimeZone">GMT</Set>
</New>
</Set>
</New>
</Set>
-->
</Configure>
- Linux(redhat 5.8)下 安装jetty 部署 使用
- Linux(RedHat 5.8)下 安装Jetty 部署 使用
- Linux下安装Jetty服务器部署Jenkins
- RedHat Linux下的WebLogic安装部署
- linux下jetty安装
- linux下安装jetty
- linux 下安装 jetty
- Redhat Linux下安装和使用Initiator
- Jetty的配置、部署与API使用——(3)Linux下利用Jetty API运行一个Jetty服务器
- linux下jetty的安装
- Linux下安装jetty服务器
- jetty在linux下安装,配置和部署一个war项目
- redhat linux 下安装 log4cpp
- redhat-linux下安装gcc
- redhat linux 下安装 log4cpp
- redhat linux 下安装 log4cpp
- Redhat linux下安装weblogic
- Linux(REDHAT) 下安装QT
- POJ2135
- Android Studio中常用设置与快捷键(私人珍藏,Eclipse转AS必看)
- (scissor , rock , paper) 三星题 剪刀石头布
- 苹果 nyoj 289
- Java多线程基础:进程和线程之由来
- Linux(RedHat 5.8)下 安装Jetty 部署 使用
- 【解决】Mysql字符集问题
- Linux 生成 core 文件的方法
- JavaScript高级程序设计之BOM之navigator 对象 第8.3讲笔记
- Unity A*寻路三个简单实用的算法
- Jetty嵌入式web的war的发布方法
- iOS 对Image图片本身进行旋转0,90,180,270
- [292]Nim Game
- 最完整的ftp命令大全