• 配置Tomcat 输入ip直接访问自己的页面


    1. 找到tomcat下的conf文件下service.xml配置文件
    2. 修改端口号为80
        <Connector port="80" protocol="HTTP/1.1"
                   connectionTimeout="20000"
                   redirectPort="8453" URIEncoding="UTF-8" />
    1. 找到结点,在节点中加入
    <Context path="" docBase="/usr/local/tomcat/apache-tomcat-7.0.85/webapps/bos" debug="0" reloadable="true" /> 

    docBase修改成项目的路径,推荐绝对路径
    4. 找到自己项目中的在web.xml,配置

        <welcome-file-list>
            <welcome-file>index.html</welcome-file>
        </welcome-file-list>

    5.在WEB-INF上加上一个页面,文件名是index.html

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Title</title>
    </head>
    <script type="text/javascript">
        window.location="/index";//写上直接访问页面的路径
    </script>
    <body>
    
    </body>
    </html>
  • 相关阅读:
    11月20日
    11月19日
    11月26日
    11月25日
    生活有感(一)
    c# word 删除指定内容
    mysql insert语句
    c# 删除word文档中某一页
    mysql 相同表结构拷贝数据
    调试再次出错
  • 原文地址:https://www.cnblogs.com/aotemanzhifu/p/9192371.html
Copyright © 2020-2023  润新知