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
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.