tomcat免重启+去掉项目名访问

 

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.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值