📄 xmlmail.jsp
字号:
<!--
http://localhost:8080/examples/jsp/xmlMail/xmlmail.jsp
-->
<%@ page import = "MyNa.utils.Env" errorPage="errorpage.jsp" %>
<%@ page import = "MyNa.xml.RowSeq" %>
<jsp:useBean id="mailbean"
class="xmlMail.XmlMailBean" scope="session"/>
<% mailbean.doCommand(new MyNa.utils.Env(request)); %>
<html>
<head><title>SimpleMail</title>
<style>
.errormessage {color:red}
.msgdate {color:blue}
.msgfromaddr {font:courier;color:pink}
.msgtoaddr {font:courier;color:green}
.msgsubject {font:arial;color:blue}
.msgcontent {font:arial;color:black}
</style>
<script>
function clk(N){
window.document.theForm.rowViewSource_rownum.value=N;
window.document.theForm.mbcmd.value="msgShow";
window.document.theForm.submit();
}
</script>
</head>
<body bgcolor="white">
<h3> A Simple Mail System in JSP (with beans). </h3>
<%
String cmd=mailbean.getMbresult();
%>
The bean result was <%= cmd %> <br>
<%
if (null==cmd){cmd="miscError";}
%>
<% if (cmd.equals("loginError")) { %>
There was something wrong with your login;
please back up and try again. The error
message was
<span class="errormessage">
<xmp>
<%= mailbean.getErrorMessage() %>
</xmp>
</span>
<% } else if (cmd.equals("miscError")) { %>
There's something wrong. The error message is
<span class="errormessage">
<xmp>
<%= mailbean.getErrorMessage() %>
</xmp>
</span>
<% } else if (cmd.equals("logout")) { %>
<%
HttpSession sess=request.getSession(false);
if(null!=sess){
%>
Ending Session : <%=sess.getId()%>
<%
sess.invalidate(); }
%>
<br> goodbye, come again soon.
<% } else if (cmd.equals("msgShow")) { %>
<%@ include file="msg.jsp" %>
<% } else if (cmd.equals("msgList")) { %>
<%@ include file="msglist.jsp" %>
<% } else if (cmd.equals("msgDelete")) { %>
<%@ include file="msgdel.jsp" %>
<% } else if (cmd.equals("messageSent")) { %>
<%@ include file="msgsent.jsp" %>
<% } else if (cmd.equals("msgListSave2XML")) { %>
XML output:
<%@ include file="msgsent.jsp" %>
<% } else if (cmd.equals("msgListOutput")) { %>
XML output into message:
<%@ include file="msgsent.jsp" %>
<% } else if (cmd.equals("msgForward")) { %>
mail output (for the list):
<%@ include file="msgsent.jsp" %>
<% } else if (cmd.equals("msgListSave2DB")) { %>
Database output:
<%@ include file="msgsent.jsp" %>
<% } else { %>
Unimplemented command:
"<span style="color:red"><%= cmd %></span>"
Please report this to system support.
<% } %>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -