thakurs Posted October 24, 2017 Share 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()); Quote Link to comment Share on other sites More sharing options...
Krydos Posted October 24, 2017 Share Posted October 24, 2017 Why not include all the files in the .war? Quote Link to comment Share on other sites More sharing options...
thakurs Posted October 25, 2017 Author Share Posted October 25, 2017 i included all the files(.XML) in war file. but it is Still showing the same error Quote Link to comment Share on other sites More sharing options...
Krydos Posted October 25, 2017 Share Posted October 25, 2017 Are you using a relative path or an absolute path? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.