|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.jetspeed.portal.portlets.AbstractPortlet org.apache.jetspeed.portal.portlets.ServletProxyPortlet
This portlet class is intended to be used for internal URLs that will
not work properly if they are part of the same request as the Jetspeed/Turbine
controller servlet--Struts-mapped URLs are an example of these.
ServletProxyPortlet uses an application context-relative URL as an input parameter. It uses data obtained from
org.apache.turbine.util.RunData
to construct an absolute URL and append the session id to it. Using this
URL, it constructs a java.net.URL object, retrieves the content from it, and converts the content to a String. Finally,
it returns an ECS StringElement created with this String for Jetspeed to render as a portlet. Content is returned as-is;
no filtering is performed on the html before returning it.
This portlet accepts 3 parameters:
URL (required) -- the web application-context relative URL (a query string may be used to pass parameters)
session_token (optional) -- token key used by the web server to pass the session id on the query string
protocol (optional) -- protocol to use to make the URL request
Field Summary | |
static java.lang.String |
DEFAULT_PROTOCOL
The default protocol used to construct the URL -- http |
static java.lang.String |
DEFAULT_SESSION_TOKEN
The default token to use to pass the session ID on the query String -- jsessionid |
static java.lang.String |
PROTOCOL_PARAMETER_NAME
The name of the parameter to hold the protocol to use (optional, default is http) |
static java.lang.String |
SESSION_TOKEN_PARAMETER_NAME
The name of the parameter to hold the token by which the session ID is passed on the query string (optional, default is jsessionid) This is included to accomodate all web servers, as the token is usually different from one server to another. |
static java.lang.String |
URL_PARAMETER_NAME
The name of the parameter to hold our application context-relative URL |
Fields inherited from class org.apache.jetspeed.portal.portlets.AbstractPortlet |
content |
Fields inherited from interface org.apache.jetspeed.portal.Portlet |
PORTLET_MAXIMIZED, PORTLET_MINIMIZED, PORTLET_NORMAL |
Constructor Summary | |
ServletProxyPortlet()
|
Method Summary | |
org.apache.ecs.ConcreteElement |
getContent(org.apache.turbine.util.RunData rundata)
Gets content by proxy (java.net.URL) from an internal URL and returns it |
protected java.lang.String |
processURL(org.apache.turbine.util.RunData rundata)
Constructs a full URL to retrieve content from. |
Methods inherited from class org.apache.jetspeed.portal.portlets.AbstractPortlet |
allowClose, allowCustomize, allowInfo, allowMaximize, allowMinimize, allowPrintFriendly, allowView, clearContent, getAllowEdit, getAllowMaximize, getAllowView, getAttribute, getContent, getContent, getCreationTime, getDescription, getDescription, getExpirationMillis, getExpire, getHandle, getHandle, getID, getImage, getImage, getInstance, getName, getPortletConfig, getTitle, getTitle, init, isCacheable, isClosed, isMinimized, isShowTitleBar, providesCustomization, refresh, setAttribute, setCacheable, setCachedObject, setClosed, setContent, setContent, setContent, setCreationTime, setDescription, setExpirationMillis, setHandle, setID, setImage, setMinimized, setName, setPortletConfig, setTitle, setTitle, supportsType |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String URL_PARAMETER_NAME
public static final java.lang.String PROTOCOL_PARAMETER_NAME
public static final java.lang.String SESSION_TOKEN_PARAMETER_NAME
public static final java.lang.String DEFAULT_PROTOCOL
public static final java.lang.String DEFAULT_SESSION_TOKEN
Constructor Detail |
public ServletProxyPortlet()
Method Detail |
public org.apache.ecs.ConcreteElement getContent(org.apache.turbine.util.RunData rundata)
getContent
in interface Portlet
getContent
in class AbstractPortlet
rundata
- The RunData object for the current request
protected java.lang.String processURL(org.apache.turbine.util.RunData rundata)
rundata
- The RunData object for the current request
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |