<%@pagelanguage="java"pageEncoding="UTF-8"%>
<%@tagliburi="http://java.sun.com/jsp/jstl/core"prefix="c"%>
<%@tagliburi="http://java.sun.com/jsp/jstl/functions"prefix="fn"%>
<!DOCTYPEHTML>
<html>
<head>
<metahttp-equiv="Content-Type"content="text/html;charset=UTF-8">
<metaname="HandheldFriendly"content="True">
<metaname="MobileOptimized"content="320">
<metaname="format-detection"content="telephone=no">
<metahttp-equiv="cleartype"content="on">
<metaname="apple-mobile-web-app-capable"content="yes">
<metaname="apple-mobile-web-app-status-bar-style"content="black">
<title>扫码</title>
<%
StringbasePath=request.getScheme()+"://"+request.getServerName()+":"+request.getLocalPort();
System.out.println("Sendrequsttosq_education.jspbasePath="+basePath);
%>
<scriptsrc="<%=basePath%>/js/jquery-1.9.0.min.js"></script>
<scriptsrc='<%=basePath%>/js/swipe.js'></script>
<divclass="top"><imgclass="logo"src="<%=basePath%>/p_w_picpaths/edu/logo.png"><imgclass="slogan"src="<%=basePath%>/p_w_picpaths/edu/slogan.png"></div>
......
request.getLocalPort()可以获取经过nginx转发后的最终端口
request.getServerPort()获取服务器接收客户到初始请求的端口
转载于:https://blog.51cto.com/keeplearning/1307034