Community
Participate
Working Groups
Build Identifier: The below commands in a JavaScript file give the following error message "File Cannot be Resolved to a type" but works fine in IE, FireFox and Netscape... String fSep = System.getProperty("file.separator"); String cDir = getServletContext().getRealPath("config"); System.out.println("CMplus Config Dir: " + cDir + fSep + "cmconfig.xml"); //Declare variables Document document; DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); //Read XML file try { DocumentBuilder builder = factory.newDocumentBuilder(); //Build document: document = builder.parse(new File(cDir + fSep + "cmconfig.xml")); nodeList = document.getElementsByTagName("CMHost"); //Generate the NodeList; . . . } Reproducible: Always Steps to Reproduce: 1. Place the above code in a .jsp file in eclipse 2. 3.
I don't understand your bug report. All the code you supplied looks like Java, not JavaScript. If this was intended to be opened against JSDT please provide specific steps to reproduce your scenario.
(In reply to comment #1) > I don't understand your bug report. All the code you supplied looks like Java, > not JavaScript. > If this was intended to be opened against JSDT please provide specific steps to > reproduce your scenario. Hi... This was closed the other day... It's definately JavaScript... I missed including the <%@ page import="java.io.File" %> statement... Once I included it...the Jsp Validator worked fine... Maybe the validation error message could be a little more exact/descriptive... Regards
*** This bug has been marked as a duplicate of bug 306976 ***