请求为jsp后缀而非do或action

1 篇文章 0 订阅
1 篇文章 0 订阅
<%
/**********************************************************************
* 重载配置:重载指定的配置项
**********************************************************************/
%>

<%@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>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值