jdk1.4 windows,unix不同的得到路径方法
只在jdk1.5以下才需要:
String filepath = "";
//如果是nuix
filepath = servlet.getServletContext().getRealPath(java.io.File.separatorChar+"template"+java.io.File.separatorChar+ path);
//如果是WINDOWS
if (java.io.File.separatorChar == '\\') {
filepath = servlet.getServletContext().getRealPath("/template/" + path);
}