在application中:
system.getproperty("user.dir")
在servlet中:
servletcontext servletcontext = config.getservletcontext();
string rootpath = servletcontext.getrealpath("/");
在jsp中:
application.getrealpath("")
在application中:
system.getproperty("user.dir")
在servlet中:
servletcontext servletcontext = config.getservletcontext();
string rootpath = servletcontext.getrealpath("/");
在jsp中:
application.getrealpath("")
扫描关注微信公众号