I tried with the below to parse in a existing xml document in a jsp page. String getFileName;// dir of xml file getFileName = request.getParameter("selected"); DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder builder = factory.newDocumentBuilder(); Document node = builder.parse(new File(getFileName)); When I try to load the page, the following error was displayed. Class jsp_servlet._fypj._supplier._receivepip.Document not found. It seems that the xml document is not found. Can someone tell me wat was the error here. thx.