您的位置:首页 > 编程语言 > Java开发

javaEE web 基础性的工程建设

2016-07-16 09:48 441 查看
common.jsp

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%
final String i18nLocal = PropertiesReader.getProperty(PropertiesKey.I18N_LOCALE);
Integer port = request.getServerPort();
String url = request.getServerName();
url = "http://"+url;
String contextPath = request.getContextPath();
if(port != 80) {
url += ":"+port+contextPath;
}else {
url += contextPath;
}
final String debugurl = url;
final String baseurl = url;
final String subSysUrl = request.getRequestURL().toString();
%>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel='stylesheet' type='text/css' href='<%=debugurl %>/javascript/bootstrap/css/bootstrap.css'>
<link rel='stylesheet' type='text/css' href='<%=debugurl %>/javascript/libs/css/icons.css'>
<link rel='stylesheet' type='text/css' href='<%=debugurl %>/javascript/plugin/ztree/css/zTreeStyle/zTreeStyle.css'>
<link rel='stylesheet' type='text/css' href='<%=debugurl %>/javascript/plugin/flexigrid/css/flexigrid.css'>
<link rel='stylesheet' type='text/css' href='<%=debugurl %>/javascript/libs/css/common.css'>
<link rel='stylesheet' type='text/css' href='<%=debugurl %>/javascript/plugin/formvalidator/style/validator.css'>
<link rel='stylesheet' type='text/css' href='<%=debugurl %>/views/home/css/head.css'>
<link rel='stylesheet' type='text/css' href='<%=debugurl %>/views/home/css/main.css'>
<link rel='stylesheet' type='text/css' href='<%=debugurl %>/javascript/multiselect/css/multiselect.css'>
<link rel='stylesheet' type='text/css' href='<%=debugurl%>/javascript/plugin/smartWizard/styles/smart_wizard_vertical.css'/>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="<%=debugurl %>/javascript/libs/html5shiv.js"></script>
<script src="<%=debugurl %>/javascript/libs/respond.js"></script>
<![endif]-->
</head>
<script type="text/javascript" src="<%=debugurl %>/javascript/jquery/jquery.js"></script>
<script type="text/javascript" src="<%=debugurl %>/javascript/bootstrap/js/bootstrap.js"></script>
<script type="text/javascript" src="<%=debugurl %>/javascript/seajs/sea.js"></script>
<script type="text/javascript" src="<%=debugurl %>/javascript/multiselect/multiselect.js"></script>
<script type="text/javascript">
var basePath = "<%=baseurl %>";
var debugurl = "<%=debugurl %>";
var subSysUrl = "<%=subSysUrl %>";
</script>
<script type="text/javascript" src="<%=debugurl %>/views/loader.js"></script> 这里是sea.js 的加载文件
<script type="text/javascript">
var basePath = "<%=baseurl %>";
var debugurl = "<%=debugurl %>";
function getPath(url){
return basePath + url;
}
</script>
<%--<%@ include file="../views/home/head_data.jsp"%>--%>

<%--<%@ include file="../views/home/base_north.jsp"%>--%>

<body>


load.js

seajs.config({
alias: {
"ztree" : debugurl+"/javascript/plugin/ztree/js/jquery.ztree.all.js",
"flexigrid" : debugurl+"/javascript/plugin/flexigrid/js/flexigrid.js",
"bootstrap-editable" : debugurl+"/javascript/plugin/bootstrap-editable/js/bootstrap-editable-inline.js",
"formvalidator" : debugurl+"/javascript/plugin/formvalidator/formValidator-4.0.1.js",
"jqueryui" : debugurl+"/javascript/plugin/jqueryui/js/jquery-ui-1.9.0.custom.js",
"timepicker" : debugurl+"/javascript/plugin/jqueryui/ui/timepicker/jquery-ui-timepicker-addon.js",
"planTemplate" : debugurl+"/javascript/plugin/planTemplate/js/planTemplate.js",
"md5" : debugurl+"/javascript/plugin/md5/md5.js",
"smartWizard" : debugurl+"/javascript/plugin/smartWizard/js/jquery.smartWizard-2.0.js",
"SmartWizard" : debugurl+"/javascript/plugin/smartWizard/js/jquery.smartWizard-2.0.1.js",
"ajaxfileupload" : debugurl+"/javascript/plugin/ajaxFileUploader/ajaxfileupload.js"
},
preload : [
// "jqueryui"
],
vars: {
'basePath': basePath
}

});


怎么使用呢? 例子

<%@ page contentType="text/html; charset=UTF-8"%>
<%@ include file="../../../tip_description.jsp"%>
<%@ include file="../../../common.jsp"%>
<script type="text/javascript" src="<%=debugurl %>/javascript/select2.js"></script>
<script type="text/javascript" src="<%=debugurl %>/javascript/excanvas.js"></script>
<link rel='stylesheet' type='text/css' href='<%=baseurl %>/views/common/css/common.css'>
<link rel='stylesheet' type='text/css' href='<%=baseurl%>/views/common/css/park.css'>
<div class="container" id="config-park">

<%@ include file="./park-list/park-list.jsp"%>
<div >

<div id="step-3" class="park-config-content">
<ul class="nav nav-tabs" id="park-tabs">

</ul>
<div class="tab-content" id="park-content">
<div name="roadWay_panel" class="tab-pane active">
<%@ include file="accordion.jsp"%>
<%@ include file="content.jsp"%>
</div>
<div name="dev_panel"  class="tab-pane" style="display: none;">
<%@ include file="./devManage/devManage_index.jsp"%>
</div>
<%--<div name="alarmlink_panel"  class="tab-pane" style="display: none;">--%>
<%--<%@ include file="./alarmLink/alarmLink_index.jsp"%>--%>
<%--</div>--%>
<div id="guide_panel" name="guide_panel"  class="tab-pane" style="display: none;">
<%@ include file="./guide/guide.jsp"%>
</div>
</div>

</div>

</div>

<div style="display: none;">

<div id="dialog-baseInfo">
<%@ include file="../../entity/baseInfo/baseInfo.jsp"%>
</div>

<div id="dialog-terminal">
<%@ include file="../../entity/terminal/terminal_grid.jsp"%>
</div>

<div id="dialog-entrance">
<%@ include file="../../entity/entrance/entrance.jsp"%>
</div>

</div>

</div>
<script type="text/javascript">
var curParkId;
var totalPlace = ${totalPlace};
seajs.use(basePath + "/views/park/action/manage/index");
</script>
<%@ include file="../../../home/foot.jsp"%>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: