|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
jrun.servlet.RequestWrapper | +--jrun.servlet.ForwardRequest
This class wraps a request object so that it can override the path component methods in the servlet API. If the query string passed in is not null, then we parse it and make the parameters available as well.
This request object that will be exposed directly to servlets. In JRun, request objects are layered (this object will wrap a protocol- specific subclass of JRunRequest). This is the "top" layer that contains a reference to the ServletContext for the current servlet, and contains any logic that is specific to this servlet context.
currently, this logic includes the URI path components, session tracking, authentication, and convenience methods that use getRealPath and getRequestDispatcher from the current servlet context.
This class is final because it is optimized to short-circuit the nesting of multiple ForwardRequests. This short-circuit logic would break if a subclass were involved. In addition, making this class final enables inlining.
| Method Summary | |
java.lang.String |
getAuthType()
|
java.lang.String |
getContextPath()
|
java.lang.String |
getParameter(java.lang.String name)
|
java.util.Map |
getParameterMap()
|
java.util.Enumeration |
getParameterNames()
|
java.lang.String[] |
getParameterValues(java.lang.String name)
Returns the values of the specified parameter for the request as an array of strings, or null if the named parameter does not exist. |
java.lang.String |
getPathInfo()
|
java.lang.String |
getPathTranslated()
|
java.lang.String |
getQueryString()
|
java.lang.String |
getRealPath(java.lang.String path)
|
java.lang.String |
getRemoteUser()
|
javax.servlet.RequestDispatcher |
getRequestDispatcher(java.lang.String relativePath)
Gets a request dispatcher from the current servlet context. |
java.lang.String |
getRequestedSessionId()
Find and return the session id using this application's session manager service. |
java.lang.String |
getRequestURI()
|
java.lang.StringBuffer |
getRequestURL()
|
java.lang.String |
getServletName()
Gets the name of the current servlet being serviced |
java.lang.String |
getServletPath()
|
javax.servlet.http.HttpSession |
getSession()
|
javax.servlet.http.HttpSession |
getSession(boolean create)
use this application's session manager to find and/or create a new session object. |
java.security.Principal |
getUserPrincipal()
Get the current session and check for an authenticated user. |
boolean |
isRequestedSessionIdFromCookie()
|
boolean |
isRequestedSessionIdFromUrl()
|
boolean |
isRequestedSessionIdFromURL()
|
boolean |
isRequestedSessionIdValid()
|
boolean |
isUserInRole(java.lang.String role)
|
void |
setCharacterEncoding(java.lang.String enc)
|
protected void |
setRequest(javax.servlet.http.HttpServletRequest request)
|
void |
setServletName(java.lang.String name)
Sets the name of the current servlet being serviced |
| Methods inherited from class jrun.servlet.RequestWrapper |
getHttpRequest, getRequestWrapper, setRequestWrapper |
| Method Detail |
protected void setRequest(javax.servlet.http.HttpServletRequest request)
public java.lang.String getContextPath()
public java.lang.String getRequestURI()
public java.lang.String getServletPath()
public java.lang.String getPathInfo()
public java.lang.String getQueryString()
public java.lang.String getParameter(java.lang.String name)
public java.lang.StringBuffer getRequestURL()
public java.util.Map getParameterMap()
public void setCharacterEncoding(java.lang.String enc)
throws java.io.UnsupportedEncodingException
public java.util.Enumeration getParameterNames()
public java.lang.String[] getParameterValues(java.lang.String name)
public javax.servlet.RequestDispatcher getRequestDispatcher(java.lang.String relativePath)
relativePath - a path that is relative to this application or this request.public javax.servlet.http.HttpSession getSession()
public javax.servlet.http.HttpSession getSession(boolean create)
public java.lang.String getRequestedSessionId()
This will return the requested session id, which in theory could be different from the session id on this request's session object.
public boolean isRequestedSessionIdFromCookie()
public boolean isRequestedSessionIdFromUrl()
public boolean isRequestedSessionIdFromURL()
public boolean isRequestedSessionIdValid()
public java.lang.String getRemoteUser()
public java.lang.String getAuthType()
public java.security.Principal getUserPrincipal()
public boolean isUserInRole(java.lang.String role)
public void setServletName(java.lang.String name)
name - The servlet namepublic java.lang.String getServletName()
public java.lang.String getRealPath(java.lang.String path)
public final java.lang.String getPathTranslated()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||