?? mail_form.xtp
字號(hào):
<s1 title="Mailing Forms"><p>A convenient way of gathering form data is simply to mail the formresults to a mailbox. Mail is the most effective push technology.</p><p>Sending mail with Resin is just like writing to a file. Resinrecycles APIs to reduce information pollution. Its VFS (virtual filesystem) extends and simplifies java.io. Sending mail is just likewriting to a file. Resin's <code/Path/> class is like <code/File/> andits <code/WriteStream/> is a combination of <code/OutputStream/> and<code/PrintWriter/>. </p><example><%@ page language=java %><%@ page import='com.caucho.vfs.*' %><%@ page import='java.util.*' %><%Path mail;mail = Vfs.lookup("mailto:survey?subject='Colors'");WriteStream os = mail.openWrite();Enumeration e = request.getParameterNames();while (e.hasMoreElements()) { String key = (String) e.nextElement(); String value = request.getParameter(key); os.println(key + ": " + value);}os.close();%><h1>Thank you for your response.</h1></example><results>name: Kermit the Frogcolor: green</results><p>The example mails results to a user named <var/survey/> on the webserver. The subject of the mail is <var/Colors/>. Scripts can addtheir own mail headers, including <var/cc/>, <var/bcc/>, and even<var/from/>. To add multiple headers, separate them by<var/&/>.</p><example>Vfs.lookup("mailto:you?subject=test&bcc=me");</example></s1>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -