thakurs Posted October 24, 2017 Posted October 24, 2017 i want to give the path of files which are using in servlet but it is giving me error (java.lang.NullPointerException) bcoz of invalid path plz help me out with the path Here is MyCode := public static Document getDOM(String test) throws SAXException,ParserConfigurationException,IOException, URISyntaxException{ Document dom=null; File quizFile=null; quizFile=new File("/home/thakurs/public_html/"+test+"-quiz-1.xml"); System.out.println("Quiz File Absolute Path "+quizFile.getAbsolutePath());
thakurs Posted October 25, 2017 Author Posted October 25, 2017 i included all the files(.XML) in war file. but it is Still showing the same error
Krydos Posted October 25, 2017 Posted October 25, 2017 Are you using a relative path or an absolute path?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now