大家帮我看看,这个问题怎么解决,先谢谢大家了!
a.jsp
<%@ page contentType="text/html; charset=GBK" %>
<script language="JavaScript">
function SetOperRight()
{
form.action="/rightServlet";
form.type.value="OPERRIGHT";
form.oper.value="OPERRIGHT";
form.target= 'operright';
form.method="post";
form.submit();
}
</script><title></title>
<body >
<center>
<form name="form" action="/managerServlet" onsubmit="return preinsert();" method="post">
<table align="center" border="0" cellpadding="0" cellspacing="2">
<tr>
<td width="50%" align=center valign=top>
<table border="0" width="100%" cellpadding="2" cellspacing="2">
<tr>
<td class=td02 align="right" bgColor=#EDECE9> 子系统:</td>
<td ><select name="sysid" style="width:135px;" onChange="SetOperRight();">
<option value=""></option>
<option value="0">老师</option>
<option value="1">家长</option>
<option value="2">学生</option>
</select></td>
</tr>
</table>
</td> <td width="50%" align=center valign=top">
<table border="0" width="100%" cellpadding="2" cellspacing="2">
<tr>
<td align="center" height="20" bgcolor="#DFDFDF"><b>操作权限</b></td>
</tr>
<tr>
<TD width="100%"><DIV align=center>
<iframe name="operright" src="b.jsp"></iframe>
</DIV>
</TD>
</tr>
</table>
</td>
</tr>
<INPUT name=okbtn TYPE=submit VALUE=" 确 定 " class=input3>
</tr>
</table>
</form>
</center>
</BODY>
</html>b.jsp
<%@ page contentType="text/html; charset=GBK" %><%@ page import="java.util.*" %>
<jsp:useBean id="bean" scope="page" class="com.JOPERRIGHT" />
<%
//得到权限模块列表
Hashtable module_table = bean.getModuleList();
if ( module_table==null )
response.sendRedirect("/opererr.jsp");
%>
<title>操作权限</title>
<body leftMargin=0 topMargin=0 bgColor=#eeeeee style="overflow:hidden">
<link href="/zzgps/css/index.css" rel=stylesheet>
<TABLE height=1 cellSpacing=1 width="100%" border=0>
<%
int count=module_table.size();
for ( int i=0; i<count; ++i )
{
if ( i<module_table.size() )
{
Hashtable htable = (Hashtable)module_table.get(new Integer(i));
out.println("<TR>");
out.println("<TD align=middle ><input type=checkbox value="+htable.get("MODULEID")+" name=Selected> </TD>");
out.println("<TD noWrap bgColor=#EDECE9>"+htable.get("MODULENAME")+"</TD>"); out.println("</TR>");
}else
{
out.println("<TR>");
out.println("<TD align=middle colspan=2> </TD>");
out.println("</TR>");
}
}
%>
</TABLE>
</BODY>
</html>我的目的是要当在a.jsp选择不同的子系统时,从数据库中读取权限表,在b.jsp中显示,现在就是能够读取权限表,但是不能显示b.jsp,请大家指点
a.jsp
<%@ page contentType="text/html; charset=GBK" %>
<script language="JavaScript">
function SetOperRight()
{
form.action="/rightServlet";
form.type.value="OPERRIGHT";
form.oper.value="OPERRIGHT";
form.target= 'operright';
form.method="post";
form.submit();
}
</script><title></title>
<body >
<center>
<form name="form" action="/managerServlet" onsubmit="return preinsert();" method="post">
<table align="center" border="0" cellpadding="0" cellspacing="2">
<tr>
<td width="50%" align=center valign=top>
<table border="0" width="100%" cellpadding="2" cellspacing="2">
<tr>
<td class=td02 align="right" bgColor=#EDECE9> 子系统:</td>
<td ><select name="sysid" style="width:135px;" onChange="SetOperRight();">
<option value=""></option>
<option value="0">老师</option>
<option value="1">家长</option>
<option value="2">学生</option>
</select></td>
</tr>
</table>
</td> <td width="50%" align=center valign=top">
<table border="0" width="100%" cellpadding="2" cellspacing="2">
<tr>
<td align="center" height="20" bgcolor="#DFDFDF"><b>操作权限</b></td>
</tr>
<tr>
<TD width="100%"><DIV align=center>
<iframe name="operright" src="b.jsp"></iframe>
</DIV>
</TD>
</tr>
</table>
</td>
</tr>
<INPUT name=okbtn TYPE=submit VALUE=" 确 定 " class=input3>
</tr>
</table>
</form>
</center>
</BODY>
</html>b.jsp
<%@ page contentType="text/html; charset=GBK" %><%@ page import="java.util.*" %>
<jsp:useBean id="bean" scope="page" class="com.JOPERRIGHT" />
<%
//得到权限模块列表
Hashtable module_table = bean.getModuleList();
if ( module_table==null )
response.sendRedirect("/opererr.jsp");
%>
<title>操作权限</title>
<body leftMargin=0 topMargin=0 bgColor=#eeeeee style="overflow:hidden">
<link href="/zzgps/css/index.css" rel=stylesheet>
<TABLE height=1 cellSpacing=1 width="100%" border=0>
<%
int count=module_table.size();
for ( int i=0; i<count; ++i )
{
if ( i<module_table.size() )
{
Hashtable htable = (Hashtable)module_table.get(new Integer(i));
out.println("<TR>");
out.println("<TD align=middle ><input type=checkbox value="+htable.get("MODULEID")+" name=Selected> </TD>");
out.println("<TD noWrap bgColor=#EDECE9>"+htable.get("MODULENAME")+"</TD>"); out.println("</TR>");
}else
{
out.println("<TR>");
out.println("<TD align=middle colspan=2> </TD>");
out.println("</TR>");
}
}
%>
</TABLE>
</BODY>
</html>我的目的是要当在a.jsp选择不同的子系统时,从数据库中读取权限表,在b.jsp中显示,现在就是能够读取权限表,但是不能显示b.jsp,请大家指点
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货