tomcat免重启
1、打开eclipse中的tomcat,点击Arguments,在VM arguments:配置如下
-noverify -javaagent:D:\softbak\jar\jrebel4.0.2\jrebel.jar //下载一个jrebeljar包
-Drebel.dirs=D:\eclipse- workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\项目名称\WEB-INF\classes //目录指向项目的classes底下
-Drebel.spring_plugin=true //如果有spring插件则为true
-Drebel.struts2-plugin=true //如果有struts2插件则为true
-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=下面是默认的-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=
-Dcatalina.base="D:\eclipse-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp1" -Dcatalina.home="D:\eclipse-workspace\apache-tomcat-6.0.24" -Dwtp.deploy="D:\eclipse-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps" -Djava.endorsed.dirs="D:\eclipse-workspace\apache-tomcat-6.0.24\endorsed"
去掉项目名访问:
1、tomcat6.0:<Host></Host>间加了一句<Context path="" docBase="/fts" debug="0" reloadable="true"/>
2、tomcat7.0 <Host></Host>间加了一句<Context path="/" docBase="fts" debug="0" reloadable="true"/>
<?xml version="1.0" encoding="utf-8"?>
<Server port="8001" shutdown="SHUTDOWN">
<Listener className="org.apache.catalina.core.JasperListener" />
<Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
<Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />
<Service name="Catalina">
<Executor name="tomcatThreadPool" namePrefix="catalina-exec-" maxThreads="1000" minSpareThreads="10"/>
<Connector executor="tomcatThreadPool" port="8081" protocol="HTTP/1.1" maxHttpHeaderSize="8192" useBodyEncodingForURI="true"
maxThreads="1000" enableLookups="false" redirectPort="8443" acceptCount="100"
compression="off" compressionMinSize="2048"
compressableMimeType="text/html,text/xml,text/javascript,text/css,text/plain"
connectionTimeout="20000" disableUploadTimeout="true" URIEncoding="UTF-8"/>
<Engine name="Catalina" defaultHost="localhost">
<Host name="localhost" appBase="webapps"
unpackWARs="false" autoDeploy="false">
<Context path="" docBase="/data/wwwroot/alo" reloadable="false" crossContext="false" privileged="true"/>
</Host>
</Engine>
</Service>
</Server>
/data/app/apache-tomcat-7.0.20/bin/shutdown.sh -config conf/server_alo.xml
/data/app/apache-tomcat-7.0.20/bin/startup.sh -config conf/server_alo.xml
<Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />这句话注意了,某些版本中没有这句话,tomcat7版本里面有,他注意是防止threadLocal内存泄漏。之前版本使用
ContextClassLoader / Threads spawned by webapps
>=6.0.24
In 6.0.24-6.0.26 TimerThread are stopped but it may lead to problems. Optional from 6.0.27 with theclearReferencesStopTimerThreads flag. Other threads may be stopped with theclearReferencesStopThreads flag, but it's unsafe.
Fix the application to stop the thread when the application is stopped
ContextClassLoader / Threads spawned by classes loaded by the common classloader
>=6.0.24
In 6.0.24-6.0.26 TimerThread are stopped but it may lead to problems. Optional from 6.0.27 with theclearReferencesStopTimerThreads flag. Other threads may be stopped with theclearReferencesStopThreads flag, but it's unsafe.
运维网声明
1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网 享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com