配置TomCat

配置TomCat
1.改端口
在conf/server.xml里改
<Connector port="80" protocol="HTTP/1.1" 
               connectionTimeout="20000" 

               redirectPort="8443" />


2.添加虚拟目录
conf/server.xml
虚拟目录的根路径下必须包含webapps/ROOT/WEB-INF文件夹
<Context path="/zhe" docBase="D:/Java/web">

3.目录列表显示功能
conf/web.xml
  <init-param>
        <param-name>listings</param-name>
        <param-value>true</param-value>
  </init-param>

false ->true

4.改主页
conf/web.xml
    <welcome-file-list>
        <welcome-file>index.html</welcome-file>
        <welcome-file>index.htm</welcome-file>
        <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>
建议不要改这个公共的,可以改虚拟目录下的WEB-INF/web.xml文件。
添加以上需要修改的内容
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章