Skip navigation links

Oracle® WebCenter Content Site Studio for External Applications Java API Reference
11g Release 1 (11.1.1)

E17273-03


oracle.stellent.wcm.javaee
Class ServletRequestContext

java.lang.Object
  extended by oracle.stellent.wcm.client.RequestContext
      extended by oracle.stellent.wcm.javaee.ServletRequestContext

Direct Known Subclasses:
ServletVelocityContext

public class ServletRequestContext
extends RequestContext

Constructor Summary
ServletRequestContext(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
ServletRequestContext(javax.servlet.jsp.JspContext jspContext)
           
ServletRequestContext(javax.servlet.jsp.PageContext pageContext)
           

 

Method Summary
 java.lang.Object getAttribute(java.lang.String name)
          Retrieve an attribute value
 java.util.Set<java.lang.String> getAttributeNames()
          Retrieve the attribute names for the given scope
 java.lang.String getContextPath()
           
 javax.servlet.jsp.PageContext getPageContext()
           
 java.util.Map<java.lang.String,java.lang.String> getParameters()
           
 javax.servlet.http.HttpServletRequest getRequest()
           
 java.lang.String getRequestPath()
           
 javax.servlet.http.HttpServletResponse getResponse()
           
 javax.servlet.ServletContext getServletContext()
           
 java.security.Principal getUserPrincipal()
           
 java.io.Writer getWriter()
           
 void include(javax.servlet.jsp.tagext.JspFragment fragment, java.util.Map<java.lang.String,java.lang.Object> objects)
          Include a fragment into the current request.
protected  void processImpl(java.lang.String path, boolean forward)
          Execute the path
 void sendRedirect(java.lang.String path)
          Send a redirect
 void setAttribute(java.lang.String name, java.lang.Object value)
          Set an attribute value by name
 void setHeader(java.lang.String name, java.lang.String value)
          Set a response header

 

Methods inherited from class oracle.stellent.wcm.client.RequestContext
forward, getParameter, getSiteContext, include, process, setSiteContext, swapAttributes

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

ServletRequestContext

public ServletRequestContext(javax.servlet.http.HttpServletRequest request,
                             javax.servlet.http.HttpServletResponse response)

ServletRequestContext

public ServletRequestContext(javax.servlet.jsp.JspContext jspContext)

ServletRequestContext

public ServletRequestContext(javax.servlet.jsp.PageContext pageContext)

Method Detail

getServletContext

public javax.servlet.ServletContext getServletContext()
Returns:
the servlet context

getRequest

public javax.servlet.http.HttpServletRequest getRequest()
Returns:
the associated request

getResponse

public javax.servlet.http.HttpServletResponse getResponse()
Returns:
the associated response

getPageContext

public javax.servlet.jsp.PageContext getPageContext()
Returns:
the page context, may be null

getWriter

public java.io.Writer getWriter()
                         throws java.io.IOException
Specified by:
getWriter in class RequestContext
Returns:
the writer for the given context
Throws:
java.io.IOException

setAttribute

public void setAttribute(java.lang.String name,
                         java.lang.Object value)
Set an attribute value by name
Specified by:
setAttribute in class RequestContext
Parameters:
name - the name
value - the value (null to remove)

getAttribute

public java.lang.Object getAttribute(java.lang.String name)
Description copied from class: RequestContext
Retrieve an attribute value
Specified by:
getAttribute in class RequestContext
Parameters:
name - the name
Returns:
the value or null if not found

getAttributeNames

public java.util.Set<java.lang.String> getAttributeNames()
Retrieve the attribute names for the given scope
Specified by:
getAttributeNames in class RequestContext
Returns:
the set of attribute names

getContextPath

public java.lang.String getContextPath()
Specified by:
getContextPath in class RequestContext
Returns:
the context path all requests are rooted under
See Also:
HttpServletRequest.getContextPath()

getRequestPath

public java.lang.String getRequestPath()
Specified by:
getRequestPath in class RequestContext
Returns:
the path of the request

getUserPrincipal

public java.security.Principal getUserPrincipal()
Specified by:
getUserPrincipal in class RequestContext
Returns:
the security principal of the current user

sendRedirect

public void sendRedirect(java.lang.String path)
                  throws java.io.IOException
Send a redirect
Specified by:
sendRedirect in class RequestContext
Parameters:
path - the path to redirect
Throws:
java.io.IOException

setHeader

public void setHeader(java.lang.String name,
                      java.lang.String value)
Set a response header
Specified by:
setHeader in class RequestContext
Parameters:
name - the name
value - the value

getParameters

public java.util.Map<java.lang.String,java.lang.String> getParameters()
Specified by:
getParameters in class RequestContext
Returns:
a map of all the request parameters

include

public void include(javax.servlet.jsp.tagext.JspFragment fragment,
                    java.util.Map<java.lang.String,java.lang.Object> objects)
             throws ApplicationException,
                    java.io.IOException
Include a fragment into the current request. Places the given objects into the request context before evaluation and restores the request after evaluation.
Parameters:
fragment - the jsp fragment
objects - the objects, may be null
Throws:
ScriptException
java.io.IOException
ApplicationException

processImpl

protected void processImpl(java.lang.String path,
                           boolean forward)
                    throws java.lang.Exception
Execute the path
Specified by:
processImpl in class RequestContext
Parameters:
path - the web application page
forward - true to forward, false to include
Throws:
java.lang.Exception

Skip navigation links

Oracle® WebCenter Content Site Studio for External Applications Java API Reference
11g Release 1 (11.1.1)

E17273-03


Copyright © 2010, 2011, Oracle and/or its affiliates. All rights reserved.