Creating URLs to Web Resources

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 can be accessed 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));