|
Regain 2.1.0-STABLE API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.regain.util.sharedtag.PageRequest
net.sf.regain.util.sharedtag.taglib.JspPageRequest
public class JspPageRequest
Adapter from a JSP page context to a SharedTag PageRequest.
Field Summary | |
---|---|
private static URL |
mBaseUrl
The base URL where the JSP files and resources are located. |
private static org.apache.log4j.Logger |
mLog
The logger for this class. |
private javax.servlet.jsp.PageContext |
mPageContext
The JSP page context to adapt. |
private static File |
mWorkingDir
The working directory of the web server. |
Constructor Summary | |
---|---|
JspPageRequest(javax.servlet.jsp.PageContext pageContext)
Creates a new instance of JspPageRequest. |
Method Summary | |
---|---|
Object |
getContextAttribute(String name)
Gets an attribute from the page context. |
String |
getHeader(String name)
Gets the header with the given name. |
long |
getHeaderAsDate(String name)
Gets the header with the given name as date. |
String |
getInitParameter(String name)
Gets an init parameter. |
Locale |
getLocale()
Gets the locale of the client. |
String |
getParameter(String name)
Gets a request parameter that was given to page via GET or POST. |
Enumeration |
getParameterNames()
Gets the names of the given parameters. |
String[] |
getParameters(String name)
Gets all request parameters with the given name that were given to the page via GET or POST. |
URL |
getResourceBaseUrl()
Gets the base URL where the JSP files and resources are located. |
Object |
getSessionAttribute(String name)
Gets an attribute from the session. |
File |
getWorkingDir()
Gets the working directory of the web server. |
void |
setContextAttribute(String name,
Object value)
Sets an attribute at the page context. |
void |
setSessionAttribute(String name,
Object value)
Sets an attribute at the session. |
Methods inherited from class net.sf.regain.util.sharedtag.PageRequest |
---|
getParameter, getParameterAsInt, getParameters, getParametersNotNull |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private javax.servlet.jsp.PageContext mPageContext
private static URL mBaseUrl
private static File mWorkingDir
private static org.apache.log4j.Logger mLog
Constructor Detail |
---|
public JspPageRequest(javax.servlet.jsp.PageContext pageContext)
pageContext
- The JSP page context to adapt.Method Detail |
---|
public String getParameter(String name)
getParameter
in class PageRequest
name
- The name of the parameter.
null
if no such parameter was
given.public String[] getParameters(String name) throws RegainException
getParameters
in class PageRequest
name
- The name of the parameter.
null
if no such parameter was
given.
RegainException
- If getting the parameter failed.public Enumeration getParameterNames()
getParameterNames
in class PageRequest
public String getHeader(String name) throws RegainException
getHeader
in class PageRequest
name
- The name of the header.
null
if no such header exists.
RegainException
- If getting the header failed.public long getHeaderAsDate(String name) throws RegainException
getHeaderAsDate
in class PageRequest
name
- The name of the header.
-1
if no such header exists.
RegainException
- If getting the header failed.public Locale getLocale() throws RegainException
getLocale
in class PageRequest
RegainException
- If getting the locale failed.public void setContextAttribute(String name, Object value)
setContextAttribute
in class PageRequest
name
- The name of the attribute to set.value
- The value of the attribute to set.public Object getContextAttribute(String name)
getContextAttribute
in class PageRequest
name
- The name of the attribute to get.
null
if there is no such
attribute.public void setSessionAttribute(String name, Object value)
setSessionAttribute
in class PageRequest
name
- The name of the attribute to set.value
- The value of the attribute to set.public Object getSessionAttribute(String name)
getSessionAttribute
in class PageRequest
name
- The name of the attribute to get.
null
if there is no such
attribute.public String getInitParameter(String name)
getInitParameter
in class PageRequest
name
- The name of the init parameter.
public URL getResourceBaseUrl() throws RegainException
getResourceBaseUrl
in class PageRequest
RegainException
- If getting the base URL failed.public File getWorkingDir() throws RegainException
getWorkingDir
in class PageRequest
RegainException
- If getting the working directory failed.
|
Regain 2.1.0-STABLE API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |