<script type="text/javascript" src="${ctx}/js/dynamic.jsp"></script>
dynamic.jsp
<%@page pageEncoding="UTF-8" contentType="text/javascript; charset=UTF-8"%>
//设置ContextPath
var __ctx='<%=request.getContextPath()%>';
var __jsessionId='<%=session.getId() %>';