draftspage.jsp

来自「it is online banking syastem in java」· JSP 代码 · 共 58 行

JSP
58
字号
<!--
It is showing the message's date,From and subject which are in Draft Folder. 
     On the Click of mail's subject hyperlink it is calling OpenDraftsMail.jsp 
     And calling DraftsTrash.jsp if user click on SendToTrash button
     And calling LogOut.jsp if user click on LogOut button
-->

<jsp:useBean id="MyConnectionBean" scope="session" class="UserPack.ConnectionBean"/>
<%@ page language="java" import="javax.mail.*, javax.mail.internet.*, java.io.*, java.util.*" %>
<% 
  Folder draft=MyConnectionBean.setDrafts(); 
  draft.open(Folder.READ_WRITE); 
  Message message[]= draft.getMessages();
%> 
<html>
<body link="#0000FF" bgcolor="#C0C0C0" text="#800080" vlink="#800000" alink="#008080">
 <script Language="JavaScript">
    function LogOut(){ 
    document.MyForm.action="LogOut.jsp";
    document.MyForm.submit();
    }
    function sendToTrash(){ 
    document.MyForm.action="SendToTrash.jsp";
    document.MyForm.submit();
    }
  </script> 
<form name="MyForm" method="POST" >
<table border="1" width="83%" height="1">
  <tr>
    <td width="4%" height="1">
    
        <p><input type="checkbox" value="on"></p>
     
    </td>
    <td width="25%" height="1">
      <p align="left"><b>Date &amp; Time</b></td>
    <td width="27%" height="1"><b>From</b></td>
    <td width="44%" height="1"><b>Subject</b></td>
  </tr>
  <% 
     for(int i=0;i<message.length;i++)
     {%>      
  <tr>
    <td width="4%" height="19"><input type="checkbox" name="box<%= i+1%>" value="on" ></td>
    <td width="25%" height="19"><% out.print(message[i].getReceivedDate().toString()); %></td>
    <td width="27%" height="19"><% out.print(message[i].getFrom()[0].toString()); %></td>
    <td><a href="OpenDraftsMail.jsp?j=<%= i%>" target="main"><%= message[i].getSubject() %></a></td>

  </tr>
   <%  }%> 
</table>
  <input type="submit" value="Send to Trash" name="B1" style="color: #800080; border-style: solid; border-color: #800080" onClick = "sendToTrash()">
  &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp<input type="Button" value="LogOut" name="B2" style="color: #800080; border-style: solid; border-color: #800080" onClick = "LogOut()">
</form>
</body>
</html>

⌨️ 快捷键说明

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