Dear all,
I am working on a
java web project using struts2. My developing environment is Eclipse+
tomcat on windows
I encountered a problem when I would like to get the path of current project.
This is the code I am using to get the path.
String filePath = request.getSession().getServletContext().getRealPath("/");
But it always returns java.lang.NullPointerException
Hope any experts could give me some help.
Thanks