<%
/**********************************************************************
* 重载配置:重载指定的配置项
**********************************************************************/
%>
<%@page import="com.MyToolkit"%>
<%@ include file="/Taglibs.jsp" %>
<script language="javascript" src="<common:webRoot/>/system/js/pubfunctions.js"></script>
<head>
<%
String strReloadFlag = request.getParameter("reload");
String strConfigName = request.getParameter("configName");
boolean hasReload = false;
if(StringUtils.isNotBlank(strReloadFlag) && "Y".equals(strReloadFlag)) {
if("ct-config".equals(strConfigName)) {
MyToolkit.getInstance().clearConfigInfoCache();
hasReload = true;
}
}
%>
<script language="javascript">
<!--
var url = "<common:webRoot/>/system/ReloadConfig.jsp";
// 点击确认按钮
function confirm(form) {
form.action = url + "?reload=Y"
var checkBoxList = document.getElementsByName("idList");
var needSubmit = false;
for(var i = 0; i < checkBoxList.length; i++) {
if(checkBoxList[i].checked) {
form.action += ("&configName=" + checkBoxList[i].value);
needSubmit = true;
}
}
if(needSubmit) {
form.submit();
} else {
alert("请选中需要重新加载的配置!");
}
}
function onload() {
document.forms[0].action = url;
if(<%=hasReload%>) {
alert("加载成功");
}
}
//-->
</script>
<title>重载配置</title>
</head>
<html>
<body οnlοad="onload();">
<form action="ReloadConfig.jsp" method="post" >
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0" class="table_tab_bgcolor">
<tr>
<td valign="top">
<table width="100%" border="0" cellpadding="6" cellspacing="6">
<tr>
<td valign="top" align="center" bgcolor="#FFFFFF">
<table width="99%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0"bgcolor="#e4e4e4">
<tr>
<td bgcolor="white" width="50%" height="35" valign="middle" class="font9">
<span class="font_gray_kai">配置项列表</span>
<td bgcolor="white" width="50%" align="right">
<input type="button" value="确定" οnclick="confirm(this.form)" class="btn_href">
</td>
</tr>
</table>
<table class="table_list" border="1" cellspacing="0" cellpadding="0" bordercolor="#b0c4de" style="border-collapse: collapse;width:100%">
<tr id="tr_ct-config">
<td width="15px">
<input type="checkbox" id="ct-config" name="idList" value="ct-config" onClick="selectRow('ct-config')" />
</td>
<td οnclick="selectTd('ct-config');">
重新加载CT-CONFIG
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</body>
</html>
请求为jsp后缀而非do或action
最新推荐文章于 2018-08-12 11:47:06 发布