Show TOC Start of Content Area

Procedure documentation Creating URLs to Web Resources  Locate the document in its SAP Library structure

This section explains how to create links to Web resources contained in your portal application. Web resources are the files in your application that are accessible directly via an HTTP request.

The following code retrieves the URL to the XML file BugsReminder.xml and outputs it to the response:

IResource myResource =
    request.getResource(IResource.XML,"xml/BugsReminder.xml");

response.write(myResource.getResourceInformation().getURL(request));

Note

Never hardcode URLs. Always use the API to create the URLs.

 

End of Content Area