web容器三种配置方式

坚强是说给别人听的谎言 提交于 2020-02-29 02:55:02

第一种:下载jetty插件

Help->Eclipse Marketplace

在这里插入图片描述
运行时配置访问路径及端口号

在这里插入图片描述

第二种:在pom.xml中配置jetty插件信息

			<!-- maven 插件扩展clean jetty:run-war -->
			<plugin>
				<groupId>org.eclipse.jetty</groupId>
				<artifactId>jetty-maven-plugin</artifactId>
				<version>9.2.18.v20160721</version>
				<configuration>
					<war>${project.basedir}/target/${artifactId}</war>
					<httpConnector>
						<port>8088</port>
					</httpConnector>
					<webAppConfig>
						<contextPath>/${project.artifactId}</contextPath>
					</webAppConfig>
				</configuration>
			</plugin>

运行时:run As–>maven build

第三种:配置tomcat

window->show view->other->servers->finish

在这里插入图片描述

在这里插入图片描述
在这里插入图片描述

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!