idea(3)-jetty配置
方式一、采用mortbay插件:
1、pom.xml
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>8.1.15.v20140411</version>
<configuration>
<stopKey>stop</stopKey>
<stopPort>9998</stopPort>
<scanIntervalSeconds>1</scanIntervalSeconds>
<contextXml>${project.basedir}/src/test/resources/jetty-context.xml</contextXml>
<webApp>
<contextPath>/${project.artifactId}</contextPath>
</webApp>
<connectors>
<connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
<port>9999</port>
<maxIdleTime>60000</maxIdleTime>
</connector>
</connectors>
</configuration>
</plugin>
注:对于org.eclipse.jetty.server.nio.SelectChannelConnector,即使没引入该jar包,也没影响。
2、jetty-context.xml
关键是在${project.basedir}/src/test/resources/目录下,创建文件:jetty-context.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
<Call name="setAttribute">
<Arg>org.eclipse.jetty.server.webapp.WebInfIncludeJarPattern</Arg>
<Arg>.*/.*jsp-api-[^/]\.jar$|./.*jsp-[^/]\.jar$|./.*taglibs[^/]*\.jar$</Arg>
</Call>
</Configure>
3、右上角maven窗口【刷新】,后,
方式二、采用eclipse插件:
1、jetty&jdk版本
9.3----->1.8
9.2----->1.7
8------->1.6
参考:https://www.eclipse.org/jetty/documentation/current/jetty-maven-plugin.html
2、pom.xml
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>9.2.26.v20180806</version>
<configuration>
<httpConnector>
<port>9999</port>
</httpConnector>
<scanIntervalSeconds>10</scanIntervalSeconds>
<webAppConfig>
<contextPath>/ebc_signpdf</contextPath>
</webAppConfig>
</configuration>
</plugin>
我用eclipse下的jetty插件时,报错:java.lang.Exception: Timeout scanning annotations。需要每次启动时,执行
mvn jetty:run -Dorg.eclipse.jetty.annotations.maxWait=120
才能解决,但是过于麻烦,因此建议采用mortbay插件。
idea(3)-jetty配置的更多相关文章
- IntelliJ IDEA使用(二):tomcat和jetty配置
上一讲用idea创建了maven web项目,接下来我们把项目发布到tomcat和jetty运行,以便进一步地开发和调试 配置tomcat 第一.打开菜单栏 第二.点击设置按钮,添加应用服务器,选择t ...
- 阿里云服务器Linux CentOS安装配置(五)jetty配置、部署
阿里云服务器Linux CentOS安装配置(五)jetty配置.部署 1.官网下载jetty:wget http://repo1.maven.org/maven2/org/eclipse/jetty ...
- IntelliJ IDEA使用(二):tomcat和jetty配置(转自:http://www.cnblogs.com/jenkinschan/p/6052948.html)
上一讲用idea创建了maven web项目,接下来我们把项目发布到tomcat和jetty运行,以便进一步地开发和调试 配置tomcat 第一.打开菜单栏 第二.点击设置按钮,添加应用服务器,选择t ...
- idea jetty 配置
一.jetty 网址下载地:https://www.eclipse.org/jetty/ 1.如下图红色箭头--> 点击Downloads 下载 2.选择最新版 .ZIP 下载 3.选择安装路径 ...
- Jetty配置
类似TomCat 登陆官网www.eclipse.org Download下载Jetty zip压缩版 解压到文件夹,打开idea的Config->Jetty-server->Local- ...
- apache+jetty 配置web jsp服务器负载均衡
首先,查找中文资料,貌似很少,有一个网友写了点,但是1版本过老,2有些地方有错误. 经过我自己摸索,记录一下.这个图很简洁明了 第一阶段 ,配置jetty 首先从 http://download.ec ...
- maven jetty 配置
对于jdk8增加如下配置: <plugin> <groupId>org.eclipse.jetty</groupId> <artifactId>jett ...
- JDK1.7 和 jetty配置教程
系统是windows 7 64位版本,32位版本同理,xp系统的自己google设置环境变量 打开设置环境变量窗口,右键计算机->我的电脑,选择属性 点击高级系统设置 选择环境变量 红线为需要设 ...
- 内置Jetty配置JSP支持过程中的常见报错
目录 1. 常见报错及解决 1.1 JSP support not configured 1.2 JSTL标签解析 1.3 JSP编译 1.4 JSP实现依赖 1.5 EL表达式支持 2. 小结 1. ...
- Jetty配置虚拟目录,实现把web项目发布到自定义目录,指定指定上下文访问;jetty编码修改
2019-12-31 17:28:38 一般只需要把Java站点文件夹或*.war文件拷贝到Web Server的webapps文件夹下,即可启动运行该站点,但更多时候,我们并不想拷贝站点,而 ...
随机推荐
- echarts柱状图每个柱子显示不同颜色,并且能够实现点击每种颜色影藏对应柱子的功能
---------------------------------------------------------代码区---------------------------------------- ...
- Linux 终端命令行提示符的艺术--PS1进阶
话不多说,先瞅瞅我的命令行提示符(有点大): 图中命令行解释:┌[阳历日期/农历日期 时间]├[当前目录下目录数+当前目录下文件数][当前绝对目录]└[用户名@主机名-第几个终端 ╰_╯] 相关配置文 ...
- 在centos上安装sequoaidb的php驱动
1:搭建PHP的运行环境 yum install httpd httpd-devel yum install php php-devel yum install php-gd php-imap p ...
- jdbc--1 一些方法的封装
今日内容介绍1.JDBC2.DBUtils====================================================================1 JDBC概念和数据 ...
- Mac常用开发工具
1.svn客户端 SVN client SmartSVN 2.git客户端 SourceTree | Free Git GUI for Mac and Windows 3.远程windows系统工具( ...
- ServletContext接口(六)
javax.servlet.ServletContext接口 ServletContext(上下文)是公用的,就是.net中的application,主要用到的就是全局set设置值,get获取值,ja ...
- C#字符串拼接的三种方式
static void Main(string[] args) { string name = "asher"; //方法1 string str1 = "hello & ...
- C++: I/O流详解
一.输入流操作 1.read 无格式输入指定字节数 istream& read ( char* pch, int nCount ); istream& read ( unsigned ...
- ASP.NET MVC 视图层-生成链接相关(Html.ActionLink,Url.Action)
1. @Html.ActionLink() 参考 也是使用在chtml模板中,返回参数中指定controller.指定action的所生成的超链接标签<a>标签html文本.如果没有指定 ...
- FPM包定制完成 (等待实现 里程碑 1 和 2) 2018年4月13日 2:18:32
前期环境准备: 关闭SELINUX : setenforce 0 关闭SELINUX : sed -i 's#SELINUX=enforcing#SELINUX=disabled#g' / ...