cancel
Showing results for 
Search instead for 
Did you mean: 

accessing an embedded HTML file in a WD EAR file.

Former Member
0 Kudos

Hi SDNs,

My WD program need to popup a static HTML page (eg: info page) from a click of a link in program.

I need to package the static HTML file in my project and link to it via a link.

in the navigator view I created a folder called "doc" in the src/components/<package> path and put the static file called file.html

I tried to link to :

http://[EPSID]:[PORT]/webdynpro/dispatcher/local/[WDPROG]/doc/file.html

Apparently it didn't work. What is the correct way to do it? Or is WD even capable of this? Thanks.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi all, Thanks for both you for your inputs.....unfortunately it doesn't seem to work quite well as I expected.

In any case I created another HTTP provider alias through Visual Admin and directly link the static HTML from there.... it's better to do it this way for maintenance purposes instead of embedding it into the WD project. Imagine you have to deploy your WD everytime you edit the HTML.

thanks anyway...points awarded as they are still useful!

Former Member
0 Kudos

Hi Jansen,

Could you please give some more detail how you did it from Visual Admin and what was the purpose that you're trying to accomplish?

Were you trying to publish some message through html page?

Thanks.

Bijay

former_member751941
Active Contributor
0 Kudos

Hi Jansen,

Try this code.Make sure your "file.html" is under the path "src/components/<package>/doc/".

try {

String linkToBeOpen =

WDURLGenerator.getWebResourceURL(

wdComponentAPI.getComponent().getDeployableObjectPart(),

"/doc/file.html");

IWDWindow window =

wdComponentAPI.getWindowManager().createNonModalExternalWindow(

linkToBeOpen,

"My window title");

window.show();

} catch (WDURLException e) {

// TODO Auto-generated catch block

e.printStackTrace();

}

It will definitely help you.

Regards,

Mithu

Former Member
0 Kudos

To get the url of html file, use this

Upon pressing the link, get the url of html file by

String url=WDURLGenerator.getResourcePath(wdComponentAPI.getComponent().getDeployableObjectPart(),"doc
file.html");

Assign this url to PortalIFrame's or IFrame's Source context variable

Regards

Fahad Hamsa