目錄
1、el標籤識別問題
1.1、每個jsp增加一個配置
<%--el標籤無法識別的問題--%>
<%@ page isELIgnored="false" %>
1.2、配置web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
id="WebApp_ID" version="2.5">
<display-name>Archetype Created Web Application</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
<jsp-config>
<jsp-property-group>
<url-pattern>*.jsp</url-pattern>
<el-ignored>false</el-ignored>
</jsp-property-group>
</jsp-config>
</web-app>
2、路徑整理
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/view/jsp/include/taglib.jsp" %>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=IE8">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>${SysParam.indextitle}</title>
<%
String path = request.getContextPath();
String basePath = request.getServerName() + ":" + request.getServerPort() + path + "/";
String baseUrlPath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<script type="text/javascript">
var path = '<%=path%>';
var basePath = '<%=basePath%>';
var baseUrlPath = '<%=baseUrlPath%>';
</script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<%-- <script type="text/javascript">
location.href = "market.business.managerList/index.html"
</script>--%>
</head>
<body>
<h1>這個是CRM</h1>
<a href="${swaggerUrl}">swagger地址</a>
<a href="${baseUrlPath}swagger-ui.html">baseUrlPath</a>
</body>
</html>