I would like to upload files to my the server/default/data directory using a simple upload servlet and be able to access them from within my application, but I can't seem to find how to access it. I tried
我想使用一个简单的上传servlet将文件上传到我的server / default / data目录,并且能够从我的应用程序中访问它们,但我似乎无法找到如何访问它。我试过了
getServletContext().getRealPath("data");
but that didn't help.
但这没有帮助。
Please help me.
请帮帮我。
1 个解决方案
#1
10
to get the absolute path, just do:
获得绝对路径,只需:
System.getProperty("jboss.server.data.dir");
#1
10
to get the absolute path, just do:
获得绝对路径,只需:
System.getProperty("jboss.server.data.dir");