jsp页面有错
是下面navigation.jsp中的manager有错,MyEclipse提示是manager cannot be resolved
网上说manager是在banner.jsp文件中定义的,banner.jsp和navigation.jsp文件都被静态包含于main.jsp文件中,在运行时这几个文件将被合成了一个servlet。
本人是初学,如何修改
navigation.jsp代码:
- HTML code
<%@ page contentType="text/html; charset=gb2312"%><%@ page import="com.dao.ManagerDAO"%><%@ page import="com.actionForm.ManagerForm"%><%ManagerDAO managerDAO=new ManagerDAO();ManagerForm form1=(ManagerForm)managerDAO.query_p(manager);int sysset1=0;int readerset1=0;int bookset1=0;int borrowback1=0;int sysquery1=0;if(form1!=null){ sysset1=form1.getSysset(); readerset1=form1.getReaderset(); bookset1=form1.getBookset(); borrowback1=form1.getBorrowback(); sysquery1=form1.getSysquery();}%><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><script src="JS/onclock.JS"></script><script src="JS/menu.JS"></script><div class=menuskin id=popmenu onmouseover="clearhidemenu();highlightmenu(event,'on')" onmouseout="highlightmenu(event,'off');dynamichide(event)" style="Z-index:100;position:absolute;"></div><table width="778" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF"> <tr bgcolor="#DFA40C"> <td width="3%" height="27"> </td> <td width="29%"><div id="bgclock" class="word_white"></div></td> <script language="javascript"> function quit(){ if(confirm("真的要退出系统吗?")){ window.location.href="logout.jsp"; } } </script> <td width="66%" align="right" bgcolor="#B0690B" class="word_white"><a href="main.jsp" class="word_white">首页</a> | <%if(sysset1==1){%><a onmouseover=showmenu(event,sysmenu) onmouseout=delayhidemenu() class="word_white" style="CURSOR:hand" >系统设置</a> | <%}%><%if(readerset1==1){%><a onmouseover=showmenu(event,readermenu) onmouseout=delayhidemenu() style="CURSOR:hand" class="word_white">读者管理</a> | <%}%><%if(bookset1==1){%><a onmouseover=showmenu(event,bookmenu) onmouseout=delayhidemenu() class="word_white" style="CURSOR:hand" >图书管理</a> | <%}%><%if(borrowback1==1){%><a onmouseover=showmenu(event,borrowmenu) onmouseout=delayhidemenu() class="word_white" style="CURSOR:hand">图书借还</a> | <%}%><%if(sysquery1==1){%><a onmouseover=showmenu(event,querymenu) onmouseout=delayhidemenu() class="word_white" style="CURSOR:hand" >系统查询</a> | <%}%><a href="manager.do?action=querypwd" class="word_white">更改口令</a> | <a href="#" onClick="quit()" class="word_white">退出系统</a></td> <td width="2%" bgcolor="#B0690B"> </td> </tr> <tr bgcolor="#DFA40C"> <td height="9" colspan="4" background="Images/navigation_bg_bottom.gif"></td> </tr></table>
banner.jsp代码
- HTML code
<%@ page contentType="text/html; charset=gb2312"%><%@ page import="com.core.ChStr" %><%ChStr chStr=new ChStr();String manager=(String)session.getAttribute("manager");//验证用户是否登录if (manager==null || "".equals(manager)){ response.sendRedirect("login.jsp");}%><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><table width="778" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td height="118" valign="top" background="Images/top_bg.gif" bgcolor="#EEEEEE"><table width="100%" height="33" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="81%" height="10"></td> <td colspan="2"></td> </tr> <tr> <td height="20"> </td> <td width="10%"><a href="#" onClick="window.location.reload();" class="word_dark">刷新页面</a></td> <td width="9%"><a href="#" onClick="myclose()" class="word_dark">关闭系统</a></td> <script language="javascript"> function myclose(){ if(confirm("真的要关闭当前窗口吗?")){ window.close(); } } </script> </tr> </table> <table width="93%" height="79" border="0" cellpadding="0" cellspacing="0"> <tr> <td height="69" align="right" valign="bottom">当前登录用户:<%=chStr.toChinese(manager)%></td> </tr> </table></td> </tr></table>