js中引用jsp的变量

<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>

<script type="text/javascript">
    var arcgis_js_api_home = "<%=arcgis_js_api_home%>";
    var basePath = "<%=basePath%>"; 
</script>
文章目录