获取java目录的路径
http://ahomeeye.iteye.com/blog/896534
java正则表达式教程
java读取Map集合的方法
http://yuexiaowen.iteye.com/blog/504929
关于获取地址的问题
<%
String basePath = request.getScheme() + "s://"
+ request.getServerName() + ":" + request.getServerPort()
+ request.getContextPath();
%>
关于生成文件夹的代码(带文件夹验证):
import java.io.*;
public class Demo
{
public static void main( String[] args)
{
File dirFile;
File tempFile;
boolean bFile;
String sFileName;
bFile = false;
try
{
dirFile = new File("E://test");
bFile = dirFile.exists();//验证文件夹是否存在
if( bFile == true )
{
System.out.println("The folder exists.");
}
else
{
System.out.println("The folder do not exist,now trying to create a one...");
bFile = dirFile.mkdir();//开始创建文件夹
if( bFile == true )
{
System.out.println("Create successfully!");
}
else
{
System.out.println("Disable to make the folder,please check the disk is full or not.");
System.exit(1);
}
}