问题描述
本人的搞了一个网络考试系统,jsp文件在实现跳转时,登陆admin后,点击试题维护按钮即转向stwh.jsp会出现白屏,数据操作都正常,数据已经存入数据库,而且Tomcat也没有报错,捕捉不到错误,贴出deafult.jsp代码请众位高手赐招,非常感谢图是这样的<%@pagelanguage="java"pageEncoding="gb2312"%><jsp:directive.pageimport="java.util.List"/><%@pageimport="entity.Ckuser"%><!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><htmlxmlns="http://www.w3.org/1999/xhtml"><head><title></title><linkhref="/zxks/admin/global.css"rel="stylesheet"type="text/css"/><styletype="text/css"><!--.STYLE1{color:#0066CC}a:visited{text-decoration:none;color:#0066CC;}a:hover{text-decoration:none;color:#0066CC;}a:active{text-decoration:none;color:#333333;}--></style><%Ckuseruser=(Ckuser)session.getAttribute("user");%><linkhref="/zxks/theme/css/subModal.css"rel="stylesheet"type="text/css"/><scriptlanguage="javascript"src="/zxks/theme/js/subModal.js"></script><scriptlanguage="javascript"src="/zxks/shop/popup.js"></script><SCRIPTlanguage=javascript>functionwindow.onload(){if(top.location!=self.location){vara=window.parent.document.getElementsByTagName('iframe');for(vari=0;i<a.length;i++){if(a[i].name==self.name){a[i].height=document.body.scrollHeight;return;}}}}functionchange(no){varc=document.getElementById("c");c.innerHTML=no;}</script><scriptlanguage=javascript>functionshow(no){for(vari=1;i<20;i++){vara=document.getElementById(no+"@"+i);if(a==null){continue;}if(a.style.display==""){a.style.display="none";}else{a.style.display="";}}}</script><scripttype="text/javascript">functionshowzhi(inn){vara=document.getElementById("loca");a.innerHTML=inn;}</script></head><bodyclass="body_bg"><inputname="countrequest"type="hidden"id="2"value=""/><tablewidth="100%"border="0"cellpadding="0"cellspacing="0"><tr><tdheight="68"align="left"valign="top"class="top_banner"><tableborder="0"cellspacing="0"cellpadding="0"><tr><tdwidth="85"height="56"align="right"class="topnav_matter_td">欢迎您:</td><tdwidth="95"align="center"class="topnav_matter_td"><%=user.getUname()%></td><tdclass="topnav_matter_td"><imgsrc="/zxks/admin/images/login.gif"width="18"height="18"hspace="4"align="absmiddle"/> <ahref="#"onclick="window.location.replace('/zxks/admin/index.jsp');returnfalse;"><fontcolor="black">注销</font></a> | <ahref="/zxks/admin/default.jsp"><fontcolor="black">刷新</font></a> </td><tdwidth="30"class="topnav_matter_td"><imgsrc="/zxks/admin/images/help.GIF"width="18"height="18"/></td><tdwidth="6"class="topnav_matter_td"> </td></tr></table></td></tr></table><tablewidth="100%"border="0"cellpadding="0"cellspacing="0"class="desk_table_bg"><tr><tdwidth="172"height="400"valign="top"class="leftsidebar_bg"><tablewidth="150"border="0"cellspacing="0"cellpadding="0"><tr><tdheight="20"></td></tr></table><tablewidth="92%"border="0"cellspacing="0"cellpadding="0"><tr><tdheight="2"></td></tr></table><%if(user.getUtype().equals("学生")){%><tablewidth="150"border="0"cellpadding="0"cellspacing="0"bgcolor="#FFFFFF"class="leftsidebar_table_frame"><trstyle="cursor:hand"><tdalign="left"onClick="show('4')"class="leftsidebar_title_td">考试管理</td></tr><trid="4@1"><tdalign="left"class="leftsidebar_title_td2"><divalign="left"><ahref="/zxks/admin/scksj.jsp"onClick="change('查看试卷')"target="main">查看试卷</a></div></td></tr><trid="4@2"><tdalign="left"class="leftsidebar_title_td2"><divalign="left"><ahref="/zxks/admin/sypf.jsp"onClick="change('查看成绩')"target="main">查看成绩</a></div></td></tr></table><%}%><%if(user.getUtype().equals("管理员")){%><tablewidth="150"border="0"cellpadding="0"cellspacing="0"bgcolor="#FFFFFF"class="leftsidebar_table_frame"><trstyle="cursor:hand"><tdalign="left"onClick="show('4')"class="leftsidebar_title_td">题库管理</td></tr><trid="4@1"><tdalign="left"class="leftsidebar_title_td2"><divalign="left"><ahref="/zxks/admin/tjst.jsp"onClick="change('添加试题')"target="main">添加试题</a></div></td></tr><trid="4@2"><tdalign="left"class="leftsidebar_title_td2"><divalign="left"><ahref="/zxks/admin/stdr.jsp"onClick="change('试题导入')"target="main">试题导入</a></div></td></tr><trid="4@3"><tdalign="left"class="leftsidebar_title_td2"><divalign="left"><ahref="/zxks/admin/stwh.jsp"onClick="change('试题维护')"target="main">试题维护</a></div></td></tr></table><%}%><%if(user.getUtype().equals("教师")){%><tablewidth="150"border="0"cellpadding="0"cellspacing="0"bgcolor="#FFFFFF"class="leftsidebar_table_frame"><trstyle="cursor:hand"><tdalign="left"onClick="show('4')"class="leftsidebar_title_td">试卷管理</td></tr><trid="4@1"><tdalign="left"class="leftsidebar_title_td2"><divalign="left"><ahref="/zxks/admin/zzsj.jsp"onClick="change('组织试卷')"target="main">组织试卷</a></div></td></tr><trid="4@2"><tdalign="left"class="leftsidebar_title_td2"><divalign="left"><ahref="/zxks/admin/cksj.jsp"onClick="change('查看试卷')"target="main">查看试卷</a></div></td></tr></table><tablewidth="150"border="0"cellpadding="0"cellspacing="0"bgcolor="#FFFFFF"class="leftsidebar_table_frame"><trstyle="cursor:hand"><tdalign="left"onClick="show('5')"class="leftsidebar_title_td">试卷评分</td></tr><trid="5@1"><tdalign="left"class="leftsidebar_title_td2"><divalign="left"><ahref="/zxks/admin/dpf.jsp"onClick="change('查看待评分试卷')"target="main">查看待评分试卷</a></div></td></tr><trid="5@2"><tdalign="left"class="leftsidebar_title_td2"><divalign="left"><ahref="/zxks/admin/ypf.jsp"onClick="change('查看已评分试卷')"target="main">查看已评分试卷</a></div></td></tr></table><tablewidth="150"border="0"cellpadding="0"cellspacing="0"bgcolor="#FFFFFF"class="leftsidebar_table_frame"><trstyle="cursor:hand"><tdalign="left"onClick="show('8')"class="leftsidebar_title_td">成绩管理</td></tr><trid="8@1"><tdalign="left"class="leftsidebar_title_td2"><divalign="left"><ahref="/zxks/admin/cjcx.jsp"onClick="change('学生成绩查询')"target="main">学生成绩查询</a></div></td></tr><trid="8@2"><tdalign="left"class="leftsidebar_title_td2"><divalign="left"><ahref="/zxks/admin/cjgl.jsp"onClick="change('学生成绩管理')"target="main">学生成绩管理</a></div></td></tr></table><%}%><tablewidth="150"border="0"cellpadding="0"cellspacing="0"bgcolor="#FFFFFF"class="leftsidebar_table_frame"><trstyle="cursor:hand"><tdalign="left"onClick="show('2')"class="leftsidebar_title_td">基本信息配置</td></tr><%if(user.getUtype().equals("0")){%><trid="2@2"><tdalign="left"class="leftsidebar_title_td2"><divalign="left"><ahref="/zxks/admin/xsgl.jsp"onClick="change('系统用户管理')"target="main">系统用户管理</a></div></td></tr><%}%><trid="2@3"><tdalign="left"class="leftsidebar_title_td2"><divalign="left"><ahref="/zxks/admin/upuser2.jsp?id=<%=user.getId()%>"onClick="change('修改个人信息')"target="main">修改个人信息</a></div></td></tr><trid="2@1"><tdalign="left"class="leftsidebar_title_td2"><divalign="left"><ahref="/zxks/admin/uppass.jsp"onClick="change('修改登录密码')"target="main">修改登录密码</a></div></td></tr></table><%Stringtext="";Stringurl="";if(user.getUtype().equals("管理员")){text="添加试题";url="/zxks/admin/tjst.jsp";}if(user.getUtype().equals("教师")){text="组织试卷";url="/zxks/admin/zzsj.jsp";}if(user.getUtype().equals("学生")){text="查看试卷";url="/zxks/admin/scksj.jsp";}%><tdvalign="top"class="main_bg"><tablewidth="100%"border="0"cellspacing="0"cellpadding="0"><tr><tdheight="32"width="295"class="main_matter_td_currentsite"> 您当前的位置:<divstyle="display:inline;"id="c"><%=text%></div></td></tr></table><iframewidth="100%"scrolling="no"frameborder="0"height="340"src="<%=url%>"style=background:transparentallowtransparencyname="main"></iframe></td></table></body></html>
解决方案
解决方案二:
白屏不一定是空的。浏览器中右击鼠标,查看页面源码是什么。
解决方案三:
也改是有标签没有结尾标签仔细找找
解决方案四:
引用楼主cx19880515的回复:
本人的搞了一个网络考试系统,jsp文件在实现跳转时,登陆admin后,点击试题维护按钮即转向stwh.jsp会出现白屏,数据操作都正常,数据已经存入数据库,而且Tomcat也没有报错,捕捉不到错误,贴出deafult.jsp代码请众位高手赐招,非常感谢图是这样的[IMG]http://i823.photobucket.com/albums/zz153/cx19880516/1-5.jpg……
源代码是<%@pagelanguage="java"pageEncoding="gb2312"%><%@pageimport="java.util.ArrayList"%><%@pageimport="java.util.List"%><%@pageimport="entity.Tk"%><%@pageimport="util.Info"%><%@pageimport="dao.hibernate3.school.TkDao"%><%@pageimport="common.web.PageManager"%><!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><htmlxmlns="http://www.w3.org/1999/xhtml"><head><title>无标题文档</title><styletype="text/css"><!--body{margin:0px;}--></style><linkhref="/zxks/admin/global.css"rel="stylesheet"type="text/css"/><scriptlanguage="javascript"src="/zxks/admin/images/popup.js"></script><scriptlanguage="javascript"src="/zxks/theme/calendar/WdatePicker.js"></script><SCRIPTlanguage=javascript><!--functionwindow.onload(){if(top.location!=self.location){vara=window.parent.document.getElementsByTagName('iframe');for(vari=0;i<a.length;i++){if(a[i].name==self.name){a[i].height=document.body.scrollHeight+350;return;}}}}//--></script><scriptlanguage="javascript"src="/sys/theme/calendar/WdatePicker.js"></script></head><body><%Stringsuc=(String)request.getAttribute("suc");if(suc!=null){%><scriptlanguage=javascript>alert("操作成功");</script><%}%><%TkDaodao=(TkDao)Info.getDao(request,"TkDao");Stringdid=request.getParameter("did");if(did!=null){dao.delete(Integer.parseInt(did));}%><%Stringhql="fromTkorderbytktxdesc";Stringurl="/zxks/admin/stwh.jsp?1=1";PageManagerpageManager=PageManager.getPage(url,40,request);pageManager.doList("Tk","1=1orderbytktxdesc");PageManagerbean=(PageManager)request.getAttribute("page");ArrayList<Tk>list=(ArrayList)bean.getCollection();%><formaction="/zxks/zxks.do?ac=dc"name="f1"method="post"><tablewidth="100%"border="0"cellpadding="0"cellspacing="0"bgcolor="#FFFFFF"class="main_table_frame"><tr><td>