一、公共页面
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>
<c:set var="ctx" value="<%=basePath%>" scope="request" />
二、页面引用
<div class="layui-tab-content">
<div class="layui-tab-item layui-show">
<iframe src='${ctx}/welcome.html' frameborder="0" scrolling="yes" class="x-iframe"></iframe>
</div>
</div>