on 02-06-2006 1:53 PM
Hi, I'm trying to open a file saved in a new folder called (XSLT) created by me in a web dynpro project.
When I try to do this, the following exception is thrown:
...java.io.FileNotFoundException: F:\usr\sap\DEP\JC00\j2ee\cluster\server0\XSLT\sad.xsl (The system cannot find the path specified)....
The code that tries to load the file is the next:
....
Document xslDoc = dBuilder.parse("XSLT/sad.xsl");
....
My Question is: what should be the file path that I should use in order to be able to open a file that is saved into a folder inside my Web Dynpro Project, of course, using a relative path...
Any ideas???
Felipe,
Classes from custom folders are not included in build.
You may place "xslt" under src/packages and acces them via ClassLoader, i.e.
Document xslDoc = dBuilder.parse
(
this.getClass().getClassLoader().getResource("xslt/sad.xsl")
);
Valery Silaev
EPAM Systems
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.