cancel
Showing results for 
Search instead for 
Did you mean: 

Error when displaying a pdf file in an iFrame

Former Member
0 Kudos

Hi,

I would like to display a pdf file in my Java Web Dynpro application. I am using an iFrame element.

The code I used is:

// test if the file exists
if( path != null)
     path = "D:\\Echanges\\Facture\\" + path + ".pdf";
if (isFile(path)) // test if the file exist
     wdContext.currentContextElement().setPath(path); // we set the path of the file for the iFrame url
else
     wdContext.currentContextElement().setPath("D:\\Echanges\\errorDocAccess.htm"); // here we set the path of an error file to display in the iFrame

In the context, path is declared as a String variable and mapped to an iFrame. What happen when I lauch the program is the followig error:

com.sap.tc.webdynpro.services.exceptions.InvalidUrlRuntimeException: Invalid URL=D:/Echanges/errorDocAccess.htm

I have checked the path of the error file and it is valid. How do I get to display my file ? The path is on the same server as the portal.

Thanks a lot for your help.

Thibault Schalck

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Not solved