SSM登录跳转到登录页,登录页不能加载js和样式

SSM登录跳转到登录页,登录页不能加载js和样式选用jsppage添加根路径。

<%
String rootPath = request.getContextPath();
%>
<link rel="stylesheet" type="text/css" href="<%=rootPath%>/modules/login/css/login.css">
<link rel="stylesheet" type="text/css" href="<%=rootPath%>/vendor/bootstrap/css/bootstrap.min.css">

可访问样式文件。

<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>

设置编码方式解决jsp页面乱码。

可以项目名访问系统!

转载于:https://www.cnblogs.com/haobingshuaike/p/9546993.html