Failed to load resource: the server responded with a status of 404 ()
layui.css:1 Failed to load resource: the server responded with a status of 404 ()
layui.js:1 Failed to load resource: the server responded with a status of 404 ()
custInf.js:1 Failed to load resource: the server responded with a status of 404 ()
customerInf.css:1 Failed to load resource: the server responded with a status of 404 ()
customerInformation.jsp:79 Uncaught ReferenceError: layui is not defined
以上是浏览器控制台报错。。。
通过下列方式导入css样式时,文件找不到
<link rel="stylesheet" href="${pageContext.request.contextPath}/css/layui.css">
原因是maven中的jsp页面默认不解析EL表达式
这里将页头改成以下方式就没问题了
<%@ page isELIgnored="false" contentType="text/html;charset=UTF-8" language="java" %>
添加了一个 isELIgnored="false"