Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Open an image in new external window...

Hi all,

I have an image in the server, say "c:\hai.jpg", through my application i want to open this image in a new external window on click of a button.

I used the following code,

		String file ="C:\images\p.JPG";

		final byte[] content = this.getByteArrayFromResourcePath(file);

		final IWDCachedWebResource resource = WDWebResource.getWebResource(content, WDWebResourceType.JPG_IMAGE);
			final IWDWindow window = wdComponentAPI.getWindowManager().createExternalWindow(resource.getAbsoluteURL(), "WD_Filedownload", true);;
		catch(Exception e){ 
			wdComponentAPI.getMessageManager().reportException(new WDNonFatalException(e), false);

This code opens a new Internet Explorer, but not the image. When i printed the AbsoluteURL of the resource, its printing null. Where am i going wrong?

Thanks in advance,


Former Member
Not what you were looking for? View more on this topic or Ask a question