我按照简单的步骤来实现这一目标。集成Tomcat和Maven与eclipse。 1.打开日食。新 - >其他 - > maven项目 - > Web应用程序 2.为tomcat添加了插件。 3.右键单击POM文件并以maven clean身份运行 4.作为maven生成源代码 5.作为maven构建运行。 6.传递命令tomcat:run 但是得到以下错误,
[ERROR] Failed to execute goal org.codehaus.mojo:tomcat-maven-plugin:1.1:run (default-cli) on project simplehelloworld: Could not start Tomcat: Protocol handler initialization failed: java.net.BindException: Address already in use: JVM_Bind <null>:8080 -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
答案 0 :(得分:1)
Could not start Tomcat: Protocol handler initialization failed: java.net.BindException: Address already in use: JVM_Bind <null>:8080
以上错误意味着端口8080上已经有服务正在运行。是否已经运行了tomcat服务器?
如果在8080上运行任何服务,则关闭它,或者您需要将server.xml中的连接器配置更改为如下所示:
<Connector port="9090" protocol="AJP/1.3" redirectPort="8443"/>
您可以找到此端口是否已被使用,请参阅Modify Django AutoField start value链接。