⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 itemlist.jsp

📁 这是《JSP案例开发》的源代码,我找了好久才找到的,分享给大家
💻 JSP
字号:
<%@ page    language="java"    contentType="text/html; charset=GBK"    import="imis.*,javax.naming.*,javax.rmi.PortableRemoteObject,java.util.*,java.sql.*,java.io.*"%><%    request.setCharacterEncoding("GBK");    session=request.getSession();    userStruct session_us=(userStruct)session.getAttribute("user");    if(session_us==null){    response.sendRedirect("../../login.html");    }  else{      try{        Context manuctx = new InitialContext();        Object manuref = manuctx.lookup("Item1Controller");        Item1ControllerHome itemControllerHome = (Item1ControllerHome) PortableRemoteObject.narrow(manuref, Item1ControllerHome.class);        Item1Controller itemController = itemControllerHome.create();        Collection collect=new ArrayList();        collect = itemController.getItemtableAll() ;                Iterator item_i = collect.iterator() ;%><link rel="stylesheet" href="/css/msa.css" type="text/css"><script language="JavaScript" src="/public/util/select.js"></script><script language="javascript" src="/public/js/table.js"></script><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><BODY class="bg" topMargin="0" leftmargin="0" rightmargin="0" marginwidth="0" marginheight="0"><div align=right>  <TABLE width=104% height="100%" border=0 align="right" cellPadding=0 cellSpacing=0 class=outter>    <TBODY>      <TR>        <TD><IMG height=4 src="/MacOS/lefttop.gif" width=6></TD>        <TD height="3" colSpan=3 background=/MacOS/top.gif><IMG height=4      src="/MacOS/top.gif" width=1></TD>        <TD><IMG src="/MacOS/righttop.gif" width="7" height=4></TD>      </TR>      <TR>        <TD vAlign=top background=/MacOS/lwing.gif rowSpan=3><IMG height=18      src="/MacOS/left.gif" width=6></TD>        <TD vAlign=top background=/MacOS/titlebg.gif width="16"> <DIV><img src="/MacOS/logo.gif" width="16" height="16" border="0"></DIV></TD>        <TD width="100%" height="18" align=center vAlign=top noWrap    background=/MacOS/titlebg.gif><SPAN      style="BACKGROUND-COLOR: #cecece"><FONT class=strong> MSA-OFFICE </font></SPAN></TD>        <TD><IMG height=18 src="/MacOS/right_b2.gif" width=18 border="0"></TD>        <TD vAlign=top background=/MacOS/rwing.gif rowSpan=3><IMG height=18      src="/MacOS/right.gif" width=7></TD>      </TR>      <TR>        <TD height="2" colSpan=3 background=/MacOS/hr.gif><IMG height=2      src="/MacOS/hr.gif" width=1></TD>      </TR>      <TR>        <TD colSpan=3 align="center" valign="top"> <table width="90%" border="1" cellspacing="1" bordercolor="#666666">            <tr bgcolor="#FAFAFA">              <td valign="top">                          <table width="100%" border="0" cellspacing="0" cellpadding="2">                    <tr bgcolor="#fafafa">                      <td width="19%"> <font class="strong" > 名称:</font> </td>                      <td width="81%"> <input name="itemName" type="text" class="file" value="" size="20" maxlength="40">                        <input type="button" name="submit" value="查询" class="file" onClick="SearchValueFromTable(window.oMain,1,window.itemName.value)">                        &nbsp; <input type="button" name="reset" value="重添" class="file" onclick="clearData(window.itemName)">                      </td>                    </tr>                </table>                <table id="oMain" class=title width="100%" border="0" cellspacing="0" cellpadding="2" onmouseover="bgChange()" onmouseout="bgBack()" onClick="javascript:rtnValues(2)">                  <tr>                  <td colspan="2" height="17" bgcolor="#666666"><font class="strongw">请选择项目名称</font></td>                  </tr>                                  <%                                  int count = 0;                                  while(item_i.hasNext())                                  {                                    count++;                     ItemtableStruct its = (ItemtableStruct)item_i.next();                     if(count%2==0){                %>          <tr align=middle bgcolor="#e0e0e0">          <%            }else          {          %>          <tr align=middle bgcolor="#fafafa">          <%          }                       %>                    <td width="30%" style="display:none"><%=its.itemid%></td>                    <td width="70%" height="20"><%=its.itemname%></td>                  </tr>                                 <%                                  }                                 %>                </table></td>            </tr>          </table>        </TD>      </TR>      <TR>        <TD vAlign=top background=/MacOS/lwing.gif>&nbsp;</TD>        <TD colSpan=3 align="center" valign="bottom">&nbsp;</TD>        <TD vAlign=top background=/MacOS/rwing.gif>&nbsp;</TD>      </TR>      <TR>        <TD height="7"><IMG height=7 src="/MacOS/leftbottom.gif" width=6></TD>        <TD background=/MacOS/bottom.gif colSpan=3><IMG height=7      src="MacOS/bottom.gif" width=1></TD>        <TD><IMG height=7 src="/MacOS/rightbottom.gif"width=7></TD>      </TR>    </TBODY>  </TABLE></div></BODY></HTML><%      }  catch(Exception e){    e.printStackTrace();       }}%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -