JDK_Tomcat_MyEclipse配置

 

 1 用MyEclipse配置完工作目录后,修改TOMCAT安装目录下的Tomcat 6.0\conf\server.xml
 2 相当于服务器的配置。
 3 D:\Program Files\Apache Software Foundation\Tomcat 6.0\conf\server.xml
 4 <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"  
 5 prefix="localhost_access_log." suffix=".txt" pattern="common" resolveHosts="false"/>        -->
 6 <Context path="/mldn" docBase="D:\webdemo"/>
 7 P189: 每次修改JavaBean都要重启服务器,这是不是太烦了,当然,你也可以用如下配置自动加载修改后的JavaBean:
 8 <Context path="/mldn" docBase="D:\webdemo" reloadable="true"/>
 9 但是这种情况,最好是在开发时用,真正产品发布时,一定要记得将 reloadable="false",
10 另外,Tomcat重新加载了新的内容后,所有的操作都将初始化,所有配置的session属性都将消失。
11 
12 修改D:\Program Files\Apache Software Foundation\Tomcat 6.0\conf\web.xml中的:
13  <servlet>
14         <servlet-name>default</servlet-name>
15         <servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class>
16         <init-param>
17             <param-name>debug</param-name>
18             <param-value>0</param-value>
19         </init-param>
20         <init-param>
21             <param-name>listings</param-name>
22             <param-value>false</param-value>
23         </init-param>
24         <load-on-startup>1</load-on-startup>
25     </servlet>
26 
27 
28  <servlet>
29         <servlet-name>default</servlet-name>
30         <servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class>
31         <init-param>
32             <param-name>debug</param-name>
33             <param-value>0</param-value>
34         </init-param>
35         <init-param>
36             <param-name>listings</param-name>
37             <param-value>true</param-value>
38         </init-param>
39         <load-on-startup>1</load-on-startup>
40     </servlet>
41 
42 修改以上两处为:
43 localhost_:<Context path="/mldn" docBase="D:\webdemo"/> 和listing <param-value>true
44 
45 修改:Tomcat的默认端口号8080为:88:
46     <Connector port="8080" protocol="HTTP/1.1" 
47                connectionTimeout="20000" 
48                redirectPort="8443" />
49 修改后:
50     <Connector port="88" protocol="HTTP/1.1" 
51                connectionTimeout="20000" 
52                redirectPort="8443" />

 

posted @ 2012-03-29 11:03  Alamps  阅读(222)  评论(1编辑  收藏  举报