Show TOC

Procedure documentationCreating URLs to Web Resources Locate this document in the navigation structure

Procedure

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:

Syntax Syntax

  1. IResource myResource = 
  2.      request.getResource(IResource.XML,"xml/BugsReminder.xml");
  3. response.write(myResource.getResourceInformation().getURL(request));
End of the code.

Note Note

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

End of the note.