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

📄 plandlg.jsp

📁 这是一个学习jsp的基本程序
💻 JSP
字号:
<%@ page
    language="java"
    contentType="text/html;charset=GBK"
         import="tianjin.*,java.util.*,java.text.*,javax.naming.*,javax.rmi.PortableRemoteObject"
        %>
  <%
    response.setHeader("Pragma","No-cache");
    response.setHeader("Cache-Control","no-cache");
    response.setDateHeader("Expires", 0);
    request.setCharacterEncoding("GBK");
       session=request.getSession();
       User1JavaBean user=null;
       user=new User1JavaBean();
       user=(User1JavaBean)session.getAttribute("user1");
       if(user==null){
       response.sendRedirect("../../error/log.htm");


    }


     Collection collect=new ArrayList();
     planStruct ps=new planStruct();
     //get naming context
     Context ctx = new InitialContext();
     //look up jndi name
     Object ref = ctx.lookup("PlanController");
     //cast to Home interface
     PlanControllerHome planControllerHome = (PlanControllerHome) PortableRemoteObject.narrow(ref, PlanControllerHome.class);
     PlanController planController = planControllerHome.create();
     Collection tcc=planController.getAll();
     planStruct tps=new planStruct();
     Iterator ti=tcc.iterator();
     while(ti.hasNext()){
     tps=(planStruct)ti.next();
     if(user.unitid.equals(tps.unitid)){
       if(tps.planstatus.equals(new Integer(1)))
     collect.add(tps);
     }
     }

%>
<HTML><HEAD><TITLE>MSA-office</TITLE>
<META content="MSHTML 5.50.4134.600" name=GENERATOR>
<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">
                  <form>
                    <tr bgcolor="#fafafa">
                      <td width="27%"> <font class="strong" > 名称:</font> </td>
                      <td width="30%"> <input name="typeName" type="text" class="file" value="" size="20" maxlength="40">
                      </td>


                      <td>
                        <input type="button" name="submit" value="查询" class="file" onclick="SearchValueFromTable(window.oMain,1,window.document.forms[0].typeName.value)">
                        &nbsp; <input type="reset" name="reset" value="重添" class="file">
                      </td>
                    </tr>
                  </form>
                </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>
                  <%
            Iterator i=collect.iterator();
            int count=0;
            while(i.hasNext()){
            count++;
            ps=(planStruct)i.next();
            if(count%2==0){
                       %>
                       <tr align=middle bgcolor="#e0e0e0">
                       <%
                         }else
                       {
                       %>
                       <tr align=middle bgcolor="#fafafa">
                       <%
                       }
                       %>
                    <td width="30%" style="display:none"></td>
                    <td width="70%" height="20"><%=ps.planname%></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"><table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td background="../../MacOS/hr.gif"><img src="../../MacOS/hr.gif" width="1" height="2"></td>
            </tr>
            <tr>
              <td> <div align="right"><a href="../../help.html" style="cursor:help" title="使用帮助" target="blank"><img src="../../MacOS/help.gif" width="16" height="16" border="0">
                  HELP</a></div></td>
            </tr>
          </table></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>

⌨️ 快捷键说明

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