- 浏览: 112300 次
- 性别:
- 来自: 山东
文章分类
最新评论
-
ly5188:
大虾,例子少了些东西,
javax.mail.Messagin ...
支持邮件群发,多附件发送的javaMail代码 -
DepthJava:
请问楼主,你的就能全部解析?
目前还没找到完全解析的方法,很多 ...
javamail接收邮件的bean,可以正确的解析中文(转)(一)
//接上一文章
/**
* 从folder中提取所有的messages
*
* @throws MessagingException
*/
public void getAllMessages() throws MessagingException {
//从邮件文件夹获取邮件信息
Message[] messages = folder.getMessages();
setMessages(messages);
setRecordFailure();//初始化出错数组
// setMessageCount();
}
/**
* 获得messageNums数组指定的message
*
* @param messageNums
* @throws MessagingException
*/
public void getMessages(int[] messageNums) throws MessagingException {
Message[] messages = folder.getMessages(messageNums);
setMessages(messages);
setRecordFailure();//初始化出错数组
// setMessageCount();
}
/**
* 获得start和end之间的message
*
* @param start
* @param end
* @throws MessagingException
*/
public void getMessages(int start, int end) throws MessagingException {
Message[] messages = folder.getMessages(start, end);
setMessages(messages);
setRecordFailure();//初始化出错数组
// setMessageCount();
}
/**
* 关闭连接
*/
public void closeConnection() {
try {
messages = null;
message = null;
if (folder.isOpen())
folder.close(true);
store.close();
System.out.println("close");
} catch (Exception e) {
System.out.println("关闭和邮件服务器之间连接时出错!");
e.printStackTrace();
}
}
/**
* 获得当前邮件的基本方法 Pop3Bean内部应该调用这个方法 以便在调用函数中加入重试机制
*
* @throws MessagingException
* @throws MessagingException
*
*/
public void getMail() throws Throwable {//抛出异常,用以重掷
try {
saveMessageAs(message);
parseMessage(message);
} catch (IOException e) {
// TODO Auto-generated catch block
System.err.println("保存邮件出错,检查保存路径");
throw new IOException("保存邮件出错,检查保存路径");
} catch (MessagingException e) {
// TODO Auto-generated catch block
System.err.println("邮件转换出错");
throw new MessagingException("邮件转换出错");
} catch (Exception e) {
System.err.println("未知错误");
otherError = true;
e.printStackTrace();
throw new Exception("未知错误");
}
}
/**
* 获得指定的邮件
*
* @param index
*/
public void getMail(int index) {
mailDownErrorCounter = 0; //邮件下载出错计数器置零
try {//获取邮件下载之前的错误
setMessage(messages[index]);//设置当前message
System.out.println("正在获取第" + index + "封邮件. . .");
getMail();//获取当前message
System.out.println("成功获取第" + index + "封邮件");
} catch (Throwable e) {//获得重掷异常
recordFailure[index] = true;
mailDownErrorCounter++;
System.err.println("下载第" + index + "封邮件时出错");
retry();
}
}
/**
* 获取messages中的所有邮件
*/
public void getAllMail() {
int mailArrayLength; //将要下载的邮件的数量。若是重试时,则为还未下载的邮件数量
mailArrayLength = getMessageCount();
System.out.println("一共有邮件" + mailArrayLength + "封");
mailDownErrorCounter = 0; //邮件下载出错计数器置零
mailCounter = 0;
for (int index = 0; index < mailArrayLength; index++) {
try {
setMessage(messages[index]);//设置当前message
System.out.println("正在获取第" + index + "封邮件. . .");
getMail();//获取当前message
System.out.println("成功获取第" + index + "封邮件");
mailCounter++;
} catch (Throwable e) {
otherError = false;
recordFailure[index] = true;
mailDownErrorCounter++;
System.err.println("下载第" + index + "封邮件时出错");
}
}
System.out.println("成功下载" + mailCounter + "封邮件");
mailCounter = 0;
if (mailDownErrorCounter != 0)
retry();
}
/**
* 保存邮件源文件
*/
public void saveMessageAs(Message message) {
String oriFileName;
String fileExtend;
try {
oriFileName = getInfoBetweenBrackets(getMessageId(message)
.toString());
//设置文件后缀名。若是附件则设法取得其文件后缀名作为将要保存文件的后缀名,若是正文部分则用.htm做后缀名
String emlName = oriFileName;
String fileNameWidthExtension = getEmlPath() + oriFileName
+ getExtension();
File storeFile = new File(fileNameWidthExtension);
for (int i = 0; storeFile.exists(); i++) {
emlName = oriFileName + i;
fileNameWidthExtension = getEmlPath() + emlName
+ getExtension();
storeFile = new File(fileNameWidthExtension);
}
setEmlName(emlName);
System.out.println("storefile's path: " + fileNameWidthExtension);
ByteArrayOutputStream baos = new ByteArrayOutputStream();
message.writeTo(baos);
StringReader in = new StringReader(baos.toString());
saveFile(fileNameWidthExtension, in);
} catch (MessagingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
/*
* 解析邮件
*/
public void parseMessage(Message message) throws IOException,
MessagingException {
Object content = message.getContent();
if (content instanceof Multipart) {
handleMultipart((Multipart) content);
} else {
handlePart(message);
}
}
/*
* 解析Multipart
*/
public void handleMultipart(Multipart multipart) throws MessagingException,
IOException {
for (int i = 0, n = multipart.getCount(); i < n; i++) {
handlePart(multipart.getBodyPart(i));
}
}
/*
* 解析指定part,从中提取文件
*/
public void handlePart(Part part) throws MessagingException, IOException {
String disposition = part.getDisposition(); // Find attachment
String contentType = part.getContentType();
String str;
InputStreamReader sbis = new InputStreamReader(part.getInputStream());
if (disposition == null) { // When just body
System.out.println("Null: " + contentType);
// Check if plain
if ((contentType.length() >= 9)
&& (contentType.toLowerCase().substring(0, 9)
.equals("text/plai"))) {
System.out.println(getAttachPath() + getEmlName() + ".txt");
saveFile(getAttachPath() + getEmlName() + ".txt", sbis);
} else if ((contentType.length() >= // Check if html
&& (contentType.toLowerCase().substring(0,
.equals("text/htm"))) {
saveFile(getAttachPath() + getEmlName() + ".html", sbis);
} else if ((contentType.length() >= 9) // Check if html
&& (contentType.toLowerCase().substring(0, 9)
.equals("image/gif"))) {
saveFile(getAttachPath() + getEmlName() + ".gif", sbis);
} else if ((contentType.length() >= 10)
&& contentType.toLowerCase().substring(0, 10).equals(
"multipart/")) { // Check if multipart
System.out.println("multipart body: " + contentType);
Multipart mp = (Multipart) (part.getContent());
handleMultipart(mp);
} else { // Unknown type
System.out.println("Other body: " + contentType);
saveFile(getAttachPath() + getEmlName() + ".txt", sbis);
}
} else if (disposition.equalsIgnoreCase(Part.ATTACHMENT)) {
System.out.println("Attachment: " + part.getFileName() + " : "
+ contentType);
//outToFile.println("Attachment: " + part.getFileName() + " : "
// + contentType);
saveFile(getAttachPath() + part.getFileName(), sbis);
} else if (disposition.equalsIgnoreCase(Part.INLINE)) {
System.out.println("Inline: " + part.getFileName() + " : "
+ contentType);
//outToFile.println("Inline: " + part.getFileName() + " : "
// + contentType);
saveFile(getAttachPath() + part.getFileName(), sbis);
} else { // Should never happen
System.out.println("Other: " + disposition);
// outToFile.println("Other: " + disposition);
}
}
public void saveFile(String fileName, Reader input) throws IOException {
if (fileName == null) {
fileName = File.createTempFile(getAttachPath() + "xx", ".out")
.getName();
}
// Do no overwrite existing file
File file = new File(fileName);
int lastDot = fileName.lastIndexOf(".");
String extension = fileName.substring(lastDot);
String fullFileName = fileName;
fileName = fileName.substring(0, lastDot);
for (int i = 0; file.exists(); i++) {
file = new File(fileName + i + extension);
}
FileWriter fos = new FileWriter(file);
BufferedWriter bos = new BufferedWriter(fos);
BufferedReader bis = new BufferedReader(input);
int aByte;
while ((aByte = bis.read()) != -1) {
bos.write(aByte);
}
bos.flush();
bos.close();
bis.close();
}
public void readEmlFile(String fileName) throws MessagingException {
try {
//TODO readEmlFile
InputStream fis = new FileInputStream(fileName);
Object emlObj = (Object)fis;
Session mailSession = Session.getDefaultInstance(System.getProperties(), null);
MimeMessage msg = new MimeMessage(mailSession,fis);
message = msg;
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
private String getInfoBetweenBrackets(String str) throws Exception {
int i, j; //用于标识字符串中的"<"和">"的位置
if (str == null) {
str = "error";
return str;
}
i = str.lastIndexOf("<");
j = str.lastIndexOf(">");
if (i != -1 && j != -1)
str = str.substring(i + 1, j);
return str;
} //当有邮件无法下载时进行重试
private void retry() {
mailCounter = 0;
while (retryTimeCounter < totalRetryTimes && mailDownErrorCounter != 0) {
if (!store.isConnected() || !folder.isOpen()) {
System.err.println("与服务器连接断开,请重新连接");
closeConnection();
return;
}
System.out.println("第" + (retryTimeCounter + 1) + "次重试");
mailDownErrorCounter = 0; //邮件下载出错计数器置零
for (int index = 0; index < getMessageCount(); index++) {
if (recordFailure[index]) {
try {
setMessage(messages[index]);//设置当前message
System.out.println("正在获取第" + index + "封邮件. . .");
getMail();//获取当前message
System.out.println("成功获取第" + index + "封邮件");
mailCounter++;
recordFailure[index] = false;
} catch (Throwable e) {
otherError = false;
recordFailure[index] = true;
mailDownErrorCounter++;
System.err.println("重新下载第" + index + "封邮件时出错");
}
}
}
retryTimeCounter++;
}
System.out.println("成功下载" + mailCounter + "封邮件");
mailCounter = 0; //将邮件计数置零
mailDownErrorCounter = 0;//下载错误数量归零
}
}
/**
* 从folder中提取所有的messages
*
* @throws MessagingException
*/
public void getAllMessages() throws MessagingException {
//从邮件文件夹获取邮件信息
Message[] messages = folder.getMessages();
setMessages(messages);
setRecordFailure();//初始化出错数组
// setMessageCount();
}
/**
* 获得messageNums数组指定的message
*
* @param messageNums
* @throws MessagingException
*/
public void getMessages(int[] messageNums) throws MessagingException {
Message[] messages = folder.getMessages(messageNums);
setMessages(messages);
setRecordFailure();//初始化出错数组
// setMessageCount();
}
/**
* 获得start和end之间的message
*
* @param start
* @param end
* @throws MessagingException
*/
public void getMessages(int start, int end) throws MessagingException {
Message[] messages = folder.getMessages(start, end);
setMessages(messages);
setRecordFailure();//初始化出错数组
// setMessageCount();
}
/**
* 关闭连接
*/
public void closeConnection() {
try {
messages = null;
message = null;
if (folder.isOpen())
folder.close(true);
store.close();
System.out.println("close");
} catch (Exception e) {
System.out.println("关闭和邮件服务器之间连接时出错!");
e.printStackTrace();
}
}
/**
* 获得当前邮件的基本方法 Pop3Bean内部应该调用这个方法 以便在调用函数中加入重试机制
*
* @throws MessagingException
* @throws MessagingException
*
*/
public void getMail() throws Throwable {//抛出异常,用以重掷
try {
saveMessageAs(message);
parseMessage(message);
} catch (IOException e) {
// TODO Auto-generated catch block
System.err.println("保存邮件出错,检查保存路径");
throw new IOException("保存邮件出错,检查保存路径");
} catch (MessagingException e) {
// TODO Auto-generated catch block
System.err.println("邮件转换出错");
throw new MessagingException("邮件转换出错");
} catch (Exception e) {
System.err.println("未知错误");
otherError = true;
e.printStackTrace();
throw new Exception("未知错误");
}
}
/**
* 获得指定的邮件
*
* @param index
*/
public void getMail(int index) {
mailDownErrorCounter = 0; //邮件下载出错计数器置零
try {//获取邮件下载之前的错误
setMessage(messages[index]);//设置当前message
System.out.println("正在获取第" + index + "封邮件. . .");
getMail();//获取当前message
System.out.println("成功获取第" + index + "封邮件");
} catch (Throwable e) {//获得重掷异常
recordFailure[index] = true;
mailDownErrorCounter++;
System.err.println("下载第" + index + "封邮件时出错");
retry();
}
}
/**
* 获取messages中的所有邮件
*/
public void getAllMail() {
int mailArrayLength; //将要下载的邮件的数量。若是重试时,则为还未下载的邮件数量
mailArrayLength = getMessageCount();
System.out.println("一共有邮件" + mailArrayLength + "封");
mailDownErrorCounter = 0; //邮件下载出错计数器置零
mailCounter = 0;
for (int index = 0; index < mailArrayLength; index++) {
try {
setMessage(messages[index]);//设置当前message
System.out.println("正在获取第" + index + "封邮件. . .");
getMail();//获取当前message
System.out.println("成功获取第" + index + "封邮件");
mailCounter++;
} catch (Throwable e) {
otherError = false;
recordFailure[index] = true;
mailDownErrorCounter++;
System.err.println("下载第" + index + "封邮件时出错");
}
}
System.out.println("成功下载" + mailCounter + "封邮件");
mailCounter = 0;
if (mailDownErrorCounter != 0)
retry();
}
/**
* 保存邮件源文件
*/
public void saveMessageAs(Message message) {
String oriFileName;
String fileExtend;
try {
oriFileName = getInfoBetweenBrackets(getMessageId(message)
.toString());
//设置文件后缀名。若是附件则设法取得其文件后缀名作为将要保存文件的后缀名,若是正文部分则用.htm做后缀名
String emlName = oriFileName;
String fileNameWidthExtension = getEmlPath() + oriFileName
+ getExtension();
File storeFile = new File(fileNameWidthExtension);
for (int i = 0; storeFile.exists(); i++) {
emlName = oriFileName + i;
fileNameWidthExtension = getEmlPath() + emlName
+ getExtension();
storeFile = new File(fileNameWidthExtension);
}
setEmlName(emlName);
System.out.println("storefile's path: " + fileNameWidthExtension);
ByteArrayOutputStream baos = new ByteArrayOutputStream();
message.writeTo(baos);
StringReader in = new StringReader(baos.toString());
saveFile(fileNameWidthExtension, in);
} catch (MessagingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
/*
* 解析邮件
*/
public void parseMessage(Message message) throws IOException,
MessagingException {
Object content = message.getContent();
if (content instanceof Multipart) {
handleMultipart((Multipart) content);
} else {
handlePart(message);
}
}
/*
* 解析Multipart
*/
public void handleMultipart(Multipart multipart) throws MessagingException,
IOException {
for (int i = 0, n = multipart.getCount(); i < n; i++) {
handlePart(multipart.getBodyPart(i));
}
}
/*
* 解析指定part,从中提取文件
*/
public void handlePart(Part part) throws MessagingException, IOException {
String disposition = part.getDisposition(); // Find attachment
String contentType = part.getContentType();
String str;
InputStreamReader sbis = new InputStreamReader(part.getInputStream());
if (disposition == null) { // When just body
System.out.println("Null: " + contentType);
// Check if plain
if ((contentType.length() >= 9)
&& (contentType.toLowerCase().substring(0, 9)
.equals("text/plai"))) {
System.out.println(getAttachPath() + getEmlName() + ".txt");
saveFile(getAttachPath() + getEmlName() + ".txt", sbis);
} else if ((contentType.length() >= // Check if html
&& (contentType.toLowerCase().substring(0,
.equals("text/htm"))) {
saveFile(getAttachPath() + getEmlName() + ".html", sbis);
} else if ((contentType.length() >= 9) // Check if html
&& (contentType.toLowerCase().substring(0, 9)
.equals("image/gif"))) {
saveFile(getAttachPath() + getEmlName() + ".gif", sbis);
} else if ((contentType.length() >= 10)
&& contentType.toLowerCase().substring(0, 10).equals(
"multipart/")) { // Check if multipart
System.out.println("multipart body: " + contentType);
Multipart mp = (Multipart) (part.getContent());
handleMultipart(mp);
} else { // Unknown type
System.out.println("Other body: " + contentType);
saveFile(getAttachPath() + getEmlName() + ".txt", sbis);
}
} else if (disposition.equalsIgnoreCase(Part.ATTACHMENT)) {
System.out.println("Attachment: " + part.getFileName() + " : "
+ contentType);
//outToFile.println("Attachment: " + part.getFileName() + " : "
// + contentType);
saveFile(getAttachPath() + part.getFileName(), sbis);
} else if (disposition.equalsIgnoreCase(Part.INLINE)) {
System.out.println("Inline: " + part.getFileName() + " : "
+ contentType);
//outToFile.println("Inline: " + part.getFileName() + " : "
// + contentType);
saveFile(getAttachPath() + part.getFileName(), sbis);
} else { // Should never happen
System.out.println("Other: " + disposition);
// outToFile.println("Other: " + disposition);
}
}
public void saveFile(String fileName, Reader input) throws IOException {
if (fileName == null) {
fileName = File.createTempFile(getAttachPath() + "xx", ".out")
.getName();
}
// Do no overwrite existing file
File file = new File(fileName);
int lastDot = fileName.lastIndexOf(".");
String extension = fileName.substring(lastDot);
String fullFileName = fileName;
fileName = fileName.substring(0, lastDot);
for (int i = 0; file.exists(); i++) {
file = new File(fileName + i + extension);
}
FileWriter fos = new FileWriter(file);
BufferedWriter bos = new BufferedWriter(fos);
BufferedReader bis = new BufferedReader(input);
int aByte;
while ((aByte = bis.read()) != -1) {
bos.write(aByte);
}
bos.flush();
bos.close();
bis.close();
}
public void readEmlFile(String fileName) throws MessagingException {
try {
//TODO readEmlFile
InputStream fis = new FileInputStream(fileName);
Object emlObj = (Object)fis;
Session mailSession = Session.getDefaultInstance(System.getProperties(), null);
MimeMessage msg = new MimeMessage(mailSession,fis);
message = msg;
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
private String getInfoBetweenBrackets(String str) throws Exception {
int i, j; //用于标识字符串中的"<"和">"的位置
if (str == null) {
str = "error";
return str;
}
i = str.lastIndexOf("<");
j = str.lastIndexOf(">");
if (i != -1 && j != -1)
str = str.substring(i + 1, j);
return str;
} //当有邮件无法下载时进行重试
private void retry() {
mailCounter = 0;
while (retryTimeCounter < totalRetryTimes && mailDownErrorCounter != 0) {
if (!store.isConnected() || !folder.isOpen()) {
System.err.println("与服务器连接断开,请重新连接");
closeConnection();
return;
}
System.out.println("第" + (retryTimeCounter + 1) + "次重试");
mailDownErrorCounter = 0; //邮件下载出错计数器置零
for (int index = 0; index < getMessageCount(); index++) {
if (recordFailure[index]) {
try {
setMessage(messages[index]);//设置当前message
System.out.println("正在获取第" + index + "封邮件. . .");
getMail();//获取当前message
System.out.println("成功获取第" + index + "封邮件");
mailCounter++;
recordFailure[index] = false;
} catch (Throwable e) {
otherError = false;
recordFailure[index] = true;
mailDownErrorCounter++;
System.err.println("重新下载第" + index + "封邮件时出错");
}
}
}
retryTimeCounter++;
}
System.out.println("成功下载" + mailCounter + "封邮件");
mailCounter = 0; //将邮件计数置零
mailDownErrorCounter = 0;//下载错误数量归零
}
}
发表评论
-
使用javamail的一些问题
2009-09-02 21:33 978今天用javamail做了一个发送邮件的功能.遇到了一系列的问 ... -
使用javamail api开发邮件服务系统时,常碰的中文乱码问题
2009-09-02 16:50 1707乱码是因为不同语系操作系统之间文字编码不通用造成的,可以用南极 ... -
javamail接收邮件的bean,可以正确的解析中文(转)(四)
2009-09-02 16:42 1360Pop3Bean.java是主要的代码 FileProper ... -
javamail接收邮件的bean,可以正确的解析中文(转)(二)
2009-09-02 16:34 1081//接上一文章 /** * 获取日期显示格式 ... -
支持邮件群发,多附件发送的javaMail代码
2009-09-02 16:31 1831在网上找了半天才找到了一点比较满意的代码,但是不能直接拿来用, ... -
用JavaMail API编写可带附件的邮件发送程序
2009-09-02 16:30 1731用JavaMail API编写可带附 ... -
javamail接收邮件的bean,可以正确的解析中文(转)(一)
2009-09-02 16:23 1464这几天写的javamail项目中接收邮件和解析邮件的类,参考了 ... -
java电子邮件(四)JavaMail(JAVA邮件服务) API详解
2009-09-02 15:35 1390一、JavaMail API简介 JavaMa ... -
java电子邮件(三)
2009-09-02 15:33 1064最新的JavaMail 1.3.1增强了在国际化字符集的处理, ... -
java电子邮件(一)
2009-09-02 15:31 1387import java.io.UnsupportedEncod ... -
java电子邮件(二)使用JavaMail收发邮件,解决了中文附件名问题
2009-09-02 15:29 1773mail.jar : http://java.sun.co ...
相关推荐
实例48 使用JAVAMAIL接收邮件 实例49 获取URL文本 实例5 哈希表和枚举器 实例50 一个简单的WEB服务器 实例51 数据报通讯:聊天吧 实例52 使用ODBC连接数据库 实例53 加载JDBC驱动 实例54 使用语句预处理 实例55 可...
2.2.2. 新的bean作用域 2.2.3. 可扩展的XML编写 2.3. 面向切面编程(AOP) 2.3.1. 更加简单的AOP XML配置 2.3.2. 对@AspectJ 切面的支持 2.4. 中间层 2.4.1. 在XML里更为简单的声明性事务配置 2.4.2. JPA 2.4.3. 异步...
第12章 在Servlet中发送和接收邮件 12. 1 电子邮件协议 12. 2 利用SMIP发送电子邮件 12. 2. 1 利用网络编程发送邮件 12. 2. 2 利用网络编程发送电子邮件的实例 12. 3 JavaMail API和电子邮件 12. 3. 1 配置...
2.2.2. 新的bean作用域 2.2.3. 可扩展的XML编写 2.3. 面向切面编程(AOP) 2.3.1. 更加简单的AOP XML配置 2.3.2. 对@AspectJ 切面的支持 2.4. 中间层 2.4.1. 在XML里更为简单的声明性事务配置 2.4.2. JPA ...
17.3.2. 使用HessianServiceExporter暴露你的bean 17.3.3. 客户端连接服务 17.3.4. 使用Burlap 17.3.5. 对通过Hessian或Burlap暴露的服务使用HTTP基础认证 17.4. 使用HTTP调用器暴露服务 17.4.1. 暴露服务对象 ...
5.2.3、第三种Scriptlet: 5.3、Scriptlet标签 5.4、page指令 5.4.1、设置页面的MIME 5.4.2、设置文件编码 5.4.3、错误页的设置 5.4.4、数据库连接操作 5.5、包含指令 5.5.1、静态包含 5.5.2、动态包含 ...
5.2.3、第三种Scriptlet: 5.3、Scriptlet标签 5.4、page指令 5.4.1、设置页面的MIME 5.4.2、设置文件编码 5.4.3、错误页的设置 5.4.4、数据库连接操作 5.5、包含指令 5.5.1、静态包含 5.5.2、动态包含 ...
5.2.3、第三种Scriptlet: 5.3、Scriptlet标签 5.4、page指令 5.4.1、设置页面的MIME 5.4.2、设置文件编码 5.4.3、错误页的设置 5.4.4、数据库连接操作 5.5、包含指令 5.5.1、静态包含 5.5.2、动态包含 ...
5.2.3、第三种Scriptlet: 5.3、Scriptlet标签 5.4、page指令 5.4.1、设置页面的MIME 5.4.2、设置文件编码 5.4.3、错误页的设置 5.4.4、数据库连接操作 5.5、包含指令 5.5.1、静态包含 5.5.2、动态包含 ...
5.2.3、第三种Scriptlet: 5.3、Scriptlet标签 5.4、page指令 5.4.1、设置页面的MIME 5.4.2、设置文件编码 5.4.3、错误页的设置 5.4.4、数据库连接操作 5.5、包含指令 5.5.1、静态包含 5.5.2、动态包含 ...
5.2.3、第三种Scriptlet: 5.3、Scriptlet标签 5.4、page指令 5.4.1、设置页面的MIME 5.4.2、设置文件编码 5.4.3、错误页的设置 5.4.4、数据库连接操作 5.5、包含指令 5.5.1、静态包含 5.5.2、动态包含 ...
5.2.3、第三种Scriptlet: 5.3、Scriptlet标签 5.4、page指令 5.4.1、设置页面的MIME 5.4.2、设置文件编码 5.4.3、错误页的设置 5.4.4、数据库连接操作 5.5、包含指令 5.5.1、静态包含 5.5.2、动态包含 ...
0300_第三部分:WEB高级开发 0309_Servlet程序开发 0310_表达式语言 0311_Tomcat数据源 0312_JSP标签编程 0313_JSP标准标签库(JSTL) 0314_AJAX开发技术 0400_第四部分:框架开发 0415_Struts基础开发 0416...