`
WKsandy
  • 浏览: 147636 次
  • 性别: Icon_minigender_1
  • 来自: 常州
社区版块
存档分类
最新评论

maven加入jetty调试

    博客分类:
  • java
阅读更多

Maven的环境下,修改pom.xml中加入插件后就能用jetty:run启动

<plugin>
	<groupId>org.mortbay.jetty</groupId>
	<artifactId>jetty-maven-plugin</artifactId>
	<version>8.1.1.v20120215</version>
	<configuration>
		<scanIntervalSeconds>10</scanIntervalSeconds>
		<stopKey>stop</stopKey>
		<stopPort>9999</stopPort>
		<webAppConfig>
			<contextPath>/${project.build.finalName}</contextPath>
		</webAppConfig>
		<connectors>
			<connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
				<port>8888</port>
				<maxIdleTime>60000</maxIdleTime>
			</connector>
		</connectors>
	</configuration>
</plugin>

 


修改js时无法保存,提示"请求的操作无法在使用用户映射区域打开的文件上执行"解决方法:

找到本地maven库repository\org\eclipse\jetty\jetty-webapp\8.1.1.v20120215\jetty-webapp-8.1.1.v20120215.jar,修改org\eclipse\jetty\jetty-webapp目录中webdefault.xml文件中useFileMappedBuffer的值为false

<init-param>
  <param-name>useFileMappedBuffer</param-name>
  <param-value>false</param-value>
</init-param>
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics