cancel
Showing results for 
Search instead for 
Did you mean: 

Open a Local File located in a Web Dynpro Project

Former Member
0 Kudos

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???

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

http://www.NetWeaverTeam.com

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Felipe,

You might find that useful:

Best regards,

Nick