http://teamojiao.iteye.com/blog/446615 //这里也有一遍blog
//E:\Jwork\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\
jquerytest\WEB-INF\classes\image\
System.out.println(ServletActionContext.getRequest().getSession().
getServletContext().getRealPath("/WEB-INF/classes/image/"));
//jquerytest
System.out.println(ServletActionContext.getRequest().getSession().
getServletContext().getContextPath());
// 获取被编译的文件路径 .getClassLoader() /E:/Jwork/jquerytest/build/classes/
System.out.println(Test.class.getClassLoader().getResource("").getPath());
//获取当前系统目录 /E:/Jwork/jquerytest/build/classes/cn/easier/
System.out.println(Test.class.getResource("").getPath());
//获取当前工程的绝对目录 E:\Jwork\jquerytest
String path= System.getProperty("user.dir");
System.out.println(path);
File file=new File(path);
System.out.println(file.exists());
System.out.println(file.mkdirs());