Class PresentationData

java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<Object,Object>
com.webmethods.portal.framework.presentation.PresentationData
All Implemented Interfaces:
IPresentationData, Serializable, Cloneable, Map<Object,Object>

public abstract class PresentationData extends HashMap<Object,Object> implements IPresentationData, Serializable, Cloneable

An instance of this class is available on every request handled by the Portal servlet. To access this instance, use the static method getPresentationData(javax.servlet.http.HttpServletRequest). This instance is initialized with data useful in presenting a response to the request, including

The web-app context path is useful when drawing a link to a static web resource hosted by the portal, such as an image. To draw a link to an image in the portal war '/ui/images/' directory, you could use the following JSP snippet:


 <img src="<%=presentationbean.getContextPath().length > 1
 ? presentationbean.getContextPath() + "/"
 : presentationbean.getContextPath()%>ui/images/myimage.gif" />
 
The full servlet path is useful when drawing a link to an aliased portal resource, such as a folder or portlet. To draw a link to the Public Folders using its alias, you could use the following JSP snippet:

 <a href="<%=presentationbean.getFullServletPath()%>folder.public">
 Public Folders
 </a>
 

See Also: