Tomcat访问localhost:8080直接跳转到项目首页

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_39403545/article/details/82153345

修改tomcat目录下的webapps/ROOT/index.jsp文件

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<script>
	window.location.href='http://localhost:8080/项目名/';
</script>
</body>
</html>

window.location.href='http://localhost:8080/项目名/'   直接用js来跳转到我们的项目

猜你喜欢

转载自blog.csdn.net/qq_39403545/article/details/82153345