instance. Clients accessing this request object
will in fact operate on the
object wrapped by this
request object.
Method from org.apache.struts2.portlet.servlet.PortletServletRequest Detail: |
public Object getAttribute(String name) {
if ("javax.servlet.include.servlet_path".equals(name)) {
return getServletPath();
} else {
return portletRequest.getAttribute(name);
}
}
|
public Enumeration getAttributeNames() {
return portletRequest.getAttributeNames();
}
|
public String getAuthType() {
return portletRequest.getAuthType();
}
|
public String getCharacterEncoding() {
if (portletRequest instanceof ActionRequest) {
return ((ActionRequest) portletRequest).getCharacterEncoding();
} else {
throw new IllegalStateException("Not allowed in render phase");
}
}
Can only be invoked in the event phase. |
public int getContentLength() {
if (portletRequest instanceof ActionRequest) {
return ((ActionRequest) portletRequest).getContentLength();
} else {
throw new IllegalStateException("Not allowed in render phase");
}
}
Can only be invoked in the event phase. |
public String getContentType() {
if (portletRequest instanceof ActionRequest) {
return ((ActionRequest) portletRequest).getContentType();
} else {
throw new IllegalStateException("Not allowed in render phase");
}
}
Can only be invoked in the event phase. |
public String getContextPath() {
return portletRequest.getContextPath();
}
|
public Cookie[] getCookies() {
if (portletRequest instanceof HttpServletRequest) {
return ((HttpServletRequest) portletRequest).getCookies();
}
throw new IllegalStateException("Not allowed in a portlet");
}
Not allowed in a portlet. |
public long getDateHeader(String name) {
throw new IllegalStateException("Not allowed in a portlet");
}
Not allowed in a portlet. |
public String getHeader(String name) {
return portletRequest.getProperty(name);
}
|
public Enumeration getHeaderNames() {
return portletRequest.getPropertyNames();
}
|
public Enumeration getHeaders(String name) {
return portletRequest.getProperties(name);
}
Gets the values for the specified property from the
PortletRequest . Note that a PortletRequest is not
guaranteed to map properties to headers. |
public ServletInputStream getInputStream() throws IOException {
if (portletRequest instanceof ActionRequest) {
return new PortletServletInputStream(((ActionRequest) portletRequest).getPortletInputStream());
} else {
throw new IllegalStateException("Not allowed in render phase");
}
}
|
public int getIntHeader(String name) {
throw new IllegalStateException("Not allowed in a portlet");
}
Not allowed in a portlet. |
public String getLocalAddr() {
if (portletRequest instanceof HttpServletRequest) {
return ((HttpServletRequest) portletRequest).getLocalAddr();
}
throw new IllegalStateException("Not allowed in a portlet");
}
Not allowed in a portlet. |
public String getLocalName() {
if (portletRequest instanceof HttpServletRequest) {
return ((HttpServletRequest) portletRequest).getLocalName();
}
throw new IllegalStateException("Not allowed in a portlet");
}
Not allowed in a portlet. |
public int getLocalPort() {
if (portletRequest instanceof HttpServletRequest) {
return ((HttpServletRequest) portletRequest).getLocalPort();
}
throw new IllegalStateException("Not allowed in a portlet");
}
Not allowed in a portlet. |
public Locale getLocale() {
return portletRequest.getLocale();
}
|
public Enumeration getLocales() {
return portletRequest.getLocales();
}
|
public String getMethod() {
return null;
}
|
public String getParameter(String name) {
return portletRequest.getParameter(name);
}
|
public Map getParameterMap() {
return portletRequest.getParameterMap();
}
|
public Enumeration getParameterNames() {
return portletRequest.getParameterNames();
}
|
public String[] getParameterValues(String name) {
return portletRequest.getParameterValues(name);
}
|
public String getPathInfo() {
return null;
}
|
public String getPathTranslated() {
return null;
}
|
public PortletRequest getPortletRequest() {
return portletRequest;
}
|
public String getProtocol() {
if (portletRequest instanceof HttpServletRequest) {
return ((HttpServletRequest) portletRequest).getProtocol();
}
throw new IllegalStateException("Not allowed in a portlet");
}
Not allowed in a portlet. |
public String getQueryString() {
return null;
}
|
public BufferedReader getReader() throws IOException {
if (portletRequest instanceof ActionRequest) {
return ((ActionRequest) portletRequest).getReader();
} else {
throw new IllegalStateException("Not allowed in render phase");
}
}
Can only be invoked in the event phase. |
public String getRealPath(String path) {
return portletContext.getRealPath(path);
}
|
public String getRemoteAddr() {
if (portletRequest instanceof HttpServletRequest) {
return ((HttpServletRequest) portletRequest).getRemoteAddr();
}
throw new IllegalStateException("Not allowed in a portlet");
}
Not allowed in a portlet. |
public String getRemoteHost() {
if (portletRequest instanceof HttpServletRequest) {
return ((HttpServletRequest) portletRequest).getRemoteHost();
}
throw new IllegalStateException("Not allowed in a portlet");
}
Not allowed in a portlet. |
public int getRemotePort() {
if (portletRequest instanceof HttpServletRequest) {
return ((HttpServletRequest) portletRequest).getRemotePort();
}
throw new IllegalStateException("Not allowed in a portlet");
}
Not allowed in a portlet. |
public String getRemoteUser() {
return portletRequest.getRemoteUser();
}
|
public RequestDispatcher getRequestDispatcher(String path) {
return new PortletServletRequestDispatcher(portletContext.getRequestDispatcher(path));
}
|
public String getRequestURI() {
throw new IllegalStateException("Not allowed in a portlet");
}
Not allowed in a portlet. |
public StringBuffer getRequestURL() {
throw new IllegalStateException("Not allowed in a portlet");
}
Not allowed in a portlet. |
public String getRequestedSessionId() {
return portletRequest.getRequestedSessionId();
}
|
public String getScheme() {
return portletRequest.getScheme();
}
|
public String getServerName() {
return portletRequest.getServerName();
}
|
public int getServerPort() {
if (portletRequest instanceof HttpServletRequest) {
return ((HttpServletRequest) portletRequest).getServerPort();
}
throw new IllegalStateException("Not allowed in a portlet");
}
Not allowed in a portlet. |
public String getServletPath() {
String actionPath = getParameter(ACTION_PARAM);
if (!hasExtension(actionPath)) {
actionPath += "." + extension;
}
return actionPath;
}
A PortletRequest has no servlet path. But for compatibility with
Struts 2 components and interceptors, the action parameter on the request
is mapped to the servlet path. |
public HttpSession getSession() {
return new PortletHttpSession(portletRequest.getPortletSession());
}
|
public HttpSession getSession(boolean create) {
return new PortletHttpSession(portletRequest.getPortletSession(create));
}
|
public Principal getUserPrincipal() {
return portletRequest.getUserPrincipal();
}
|
public boolean isRequestedSessionIdFromCookie() {
throw new IllegalStateException("Not allowed in a portlet");
}
Not allowed in a portlet. |
public boolean isRequestedSessionIdFromURL() {
throw new IllegalStateException("Not allowed in a portlet");
}
Not allowed in a portlet. |
public boolean isRequestedSessionIdFromUrl() {
throw new IllegalStateException("Not allowed in a portlet");
}
Not allowed in a portlet. |
public boolean isRequestedSessionIdValid() {
return portletRequest.isRequestedSessionIdValid();
}
|
public boolean isSecure() {
return portletRequest.isSecure();
}
|
public boolean isUserInRole(String role) {
return portletRequest.isUserInRole(role);
}
|
public void removeAttribute(String name) {
portletRequest.removeAttribute(name);
}
|
public void setAttribute(String name,
Object o) {
portletRequest.setAttribute(name, o);
}
|
public void setCharacterEncoding(String env) throws UnsupportedEncodingException {
if (portletRequest instanceof ActionRequest) {
((ActionRequest) portletRequest).setCharacterEncoding(env);
} else {
throw new IllegalStateException("Not allowed in render phase");
}
}
Can only be invoked in the event phase. |
public void setExtension(String extension) {
if (extension != null) {
this.extension = extension.split(",")[0];
}
}
|