pathname=".\\upload";
File file=new File(pathname);
file.mkdir();
后就在C:\Documents and Settings\Administrator\「开始」菜单\程序\Apache Tomcat 4.0里创建了一个目录。
而我想在WebServer的根目录下创建的。
谁能帮我解决这个问题呢,谢谢了。
try:
<%
String sPath = request.getRealPath("/") ; //来得到WebServer的根目录的绝对路径
//然后:
String pathname=sPath+"upload";
File file=new File(pathname);
file.mkdir();
%>