<%@ page contentType="text/html;charset=UTF-8"%>
<%@ page import="com.keyusoft.util.GlobalParameterUtil" %>
<jsp:directive.page />
<jsp:directive.page import="java.util.Calendar" />
<%
String ctx = request.getContextPath();
String manualStdStr = GlobalParameterUtil.getGlobalParameterUtil().getParameter("IS_MANUAL_STANDARD");
boolean manualStd = false;//自动标准化开关(true=启用,false=不启用)
if(manualStdStr.equals("1")) manualStd=true;
response.setHeader("Pragma", "No-cache");
response.setHeader("Cache-Control", "no-cache");
response.setDateHeader("Expires", 0);
%>
<html>
<head>
<script type="text/javascript">
ctx="<%=request.getContextPath()%>";
manualStd = <%=manualStd%>;
enableDiscode = <%=enableDiscode%>;
enableScanType = <%=enableScanType%>
</script>
.........ext或其他js文件引用(文件里面可以引用js的跟路径变量,如:src="'+ ctx + '/kytool!queryActions.action" 等
.........
注意上面定义了java根路径变量和js的跟路径变量ctx!
代码如下:
转载于:https://my.oschina.net/tiancai/blog/87309