tomcat的端口修改后在eclipse中自动恢复

eclipse中tomcat修改默认端口

因为项目中使用的数据库和tomcat的端口冲突,需要修改tomcat的默认端口设置。方法挺简单的,修改tomcat安装目录下conf目录中的server.xml中的端口号就可以了。我索性把所有的端口号都加了2,结果在eclipse中启动tomcat后项目地址使用的端口还是8080,可我明明改过了,这时再打开server.xml文件,发现端口号又变回之前的了,奇怪。google一会后,发现了解决方法:
在server视图下双击tomcat会弹出tomcat的配置窗口,按下图修改tomcat的端口,保存后重新启动tomcat就可以了。


这时本地安装的tomcat下的server.xml中的端口也变成你刚才修改后的端口了。这说明eclipse会使用自己配置的tomcat,光修改本地安装的tomcat中的server.xml中的端口是不够的。
还有一种方法是把现在eclipse使用的tomcat删除,再重新配置一遍也可以。这个方法我没验证过,不过也有很多人使用这种方法成功了。说明配置tomcat后eclipse就会使用这个配置好的tomcat,而不是你本地配置的那个了。
发布了23 篇原创文章 · 获赞 8 · 访问量 5万+
展开阅读全文

eclipse启动tomcat问题,请各位大神帮忙解决,感激不尽

06-22

2016-6-22 8:26:08 org.apache.catalina.core.StandardContext startInternal 严重: One or more listeners failed to start. Full details will be found in the appropriate container log file 2016-6-22 8:26:08 org.apache.catalina.core.StandardContext startInternal 严重: Context [/V6R3PeiXun] startup failed due to previous errors 2016-6-22 8:26:08 org.apache.catalina.core.ApplicationContext log 信息: Closing Spring root WebApplicationContext 2016-6-22 8:26:09 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesJdbc 严重: The web application [/V6R3PeiXun] registered the JDBC driver [oracle.jdbc.driver.OracleDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered. 2016-6-22 8:26:09 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads 严重: The web application [/V6R3PeiXun] appears to have started a thread named [com.google.common.base.internal.Finalizer] but has failed to stop it. This is very likely to create a memory leak. 2016-6-22 8:26:09 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads 严重: The web application [/V6R3PeiXun] appears to have started a thread named [BoneCP-release-thread-helper-thread] but has failed to stop it. This is very likely to create a memory leak. 2016-6-22 8:26:09 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads 严重: The web application [/V6R3PeiXun] appears to have started a thread named [BoneCP-release-thread-helper-thread] but has failed to stop it. This is very likely to create a memory leak. 2016-6-22 8:26:09 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads 严重: The web application [/V6R3PeiXun] appears to have started a thread named [BoneCP-release-thread-helper-thread] but has failed to stop it. This is very likely to create a memory leak. 2016-6-22 8:26:09 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads 严重: The web application [/V6R3PeiXun] appears to have started a thread named [BoneCP-keep-alive-scheduler] but has failed to stop it. This is very likely to create a memory leak. 2016-6-22 8:26:09 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads 严重: The web application [/V6R3PeiXun] appears to have started a thread named [BoneCP-pool-watch-thread] but has failed to stop it. This is very likely to create a memory leak. 2016-6-22 8:26:09 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads 严重: The web application [/V6R3PeiXun] appears to have started a thread named [BoneCP-release-thread-helper-thread] but has failed to stop it. This is very likely to create a memory leak. 2016-6-22 8:26:09 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads 严重: The web application [/V6R3PeiXun] appears to have started a thread named [BoneCP-release-thread-helper-thread] but has failed to stop it. This is very likely to create a memory leak. 2016-6-22 8:26:09 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads 严重: The web application [/V6R3PeiXun] appears to have started a thread named [BoneCP-release-thread-helper-thread] but has failed to stop it. This is very likely to create a memory leak. 2016-6-22 8:26:09 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads 严重: The web application [/V6R3PeiXun] appears to have started a thread named [BoneCP-keep-alive-scheduler] but has failed to stop it. This is very likely to create a memory leak. 2016-6-22 8:26:09 org.apache.catalina.loader.WebappClassLoaderBase checkThreadLocalMapForLeaks 严重: The web application [/V6R3PeiXun] created a ThreadLocal with key of type [jsr166y.ThreadLocalRandom$1] (value [jsr166y.ThreadLocalRandom$1@190a036]) and a value of type [jsr166y.ThreadLocalRandom] (value [jsr166y.ThreadLocalRandom@67794]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak. 2016-6-22 8:26:09 org.apache.catalina.loader.WebappClassLoaderBase checkThreadLocalMapForLeaks 严重: The web application [/V6R3PeiXun] created a ThreadLocal with key of type [jsr166y.ThreadLocalRandom$1] (value [jsr166y.ThreadLocalRandom$1@190a036]) and a value of type [jsr166y.ThreadLocalRandom] (value [jsr166y.ThreadLocalRandom@9498a3]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak. 2016-6-22 8:26:09 org.apache.catalina.loader.WebappClassLoaderBase checkThreadLocalMapForLeaks 严重: The web application [/V6R3PeiXun] created a ThreadLocal with key of type [jsr166y.ThreadLocalRandom$1] (value [jsr166y.ThreadLocalRandom$1@190a036]) and a value of type [jsr166y.ThreadLocalRandom] (value [jsr166y.ThreadLocalRandom@1b0fedc]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak. 2016-6-22 8:26:09 org.apache.catalina.loader.WebappClassLoaderBase checkThreadLocalMapForLeaks 严重: The web application [/V6R3PeiXun] created a ThreadLocal with key of type [jsr166y.ThreadLocalRandom$1] (value [jsr166y.ThreadLocalRandom$1@190a036]) and a value of type [jsr166y.ThreadLocalRandom] (value [jsr166y.ThreadLocalRandom@14d4bcb]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak. 2016-6-22 8:26:09 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deploying web application directory D:\Tomcat 7.0\webapps\docs 问答

没有更多推荐了,返回首页

©️2019 CSDN 皮肤主题: 大白 设计师: CSDN官方博客

分享到微信朋友圈

×

扫一扫,手机浏览