About Mode JPS and PDK-Java

Creating Java Portlets 6-9

6.1.2.1.1 Intraportlet Links Intraportlet links go to different sections or pages within a

given portlet. Strictly speaking, they refer to the page containing the portlet, but they contain parameters that cause the portlet to render a different section or page within that page when it is requested by the user. As a direct consequence, a portlet cannot expect to render links to different sections or pages of itself using relative links or absolute links based on its own server context. Intraportlet link are useful for intraportlet navigation, either as links or form submission targets.

6.1.2.1.2 Portal Links Portal links refer to significant pages within Oracle Portal, such

as the users home page.

6.1.2.1.3 External Links External links refer neither to the portlet through a page nor

to any part of the portal. If selected, these links take the user away from the portal, for example, www.oracle.com.

6.1.2.1.4 InternalResource Links InternalResource links refer to internal to the portlet

resources. Sometimes they are exclusively used internally during portlet rendering, for example as a server side include. On other occasions, they may be used externally to reference portlet resources like images. In this latter case, you can use the PDK-Java constructResourceURL method in the UrlUtils class to retrieve images from behind a firewall using resource proxy. For example, lottery.jsp of the lottery sample, which is available with PDK-Java, contains resource proxy requests for images. page contentType=texthtml;charset=UTF-8 page session=false import=oracle.portal.provider.v2.render. page import=oracle.portal.provider.v2.render.http.HttpPortletRendererUtil page import=oracle.portal.provider.v2.url.UrlUtils page import=oracle.portal.sample.v2.devguide.lottery. LottoPicker picker = new LottoPicker; picker.setIdentityrequest.getRemoteAddr ; PortletRenderRequest portletRequest = PortletRenderRequest request.getAttributeoracle.portal.PortletRenderRequest; String name = portletRequest.getUser.getName; P class=PortletHeading1 ALIGN=CENTERHi = name , Your Specially PickedP P ALIGN=CENTERIMG SRC== UrlUtils.constructResourceURLportletRequest, HttpPortletRendererUtil.absoluteLinkrequest, imageswinningnumbers.gif WIDTH=450 HEIGHT=69 ALIGN=BOTTOM BORDER=0P P P ALIGN=CENTER TABLE ALIGN=CENTER BORDER=0 CELLPADDING=0 CELLSPACING=0 TR int [] picks = picker.getPicks; for int i = 0; i picks.length; i++ { TD IMG SRC== UrlUtils.constructResourceURLportletRequest, HttpPortletRendererUtil.absoluteLinkrequest, imagesball + picks[i] .gif WIDTH=68 HEIGHT=76 ALIGN=BOTTOM BORDER=0 TD }