This project has retired. For details please refer to its Attic page.
JspTilesRequestContext (Tiles 2 2.1.4 API)

org.apache.tiles.jsp.context
Class JspTilesRequestContext

Package class diagram package JspTilesRequestContext
java.lang.Object
  extended by org.apache.tiles.context.TilesRequestContextWrapper
      extended by org.apache.tiles.jsp.context.JspTilesRequestContext
All Implemented Interfaces:
TilesRequestContext

public class JspTilesRequestContext
extends TilesRequestContextWrapper
implements TilesRequestContext

Context implementation used for executing tiles within a jsp tag library.

Version:
$Rev: 736275 $ $Date: 2009-01-21 10:58:20 +0100 (mer, 21 gen 2009) $

Constructor Summary
JspTilesRequestContext(ServletContext context, PageContext pageContext)
          Deprecated. Use JspTilesRequestContext(TilesRequestContext, PageContext).
JspTilesRequestContext(TilesRequestContext enclosedRequest, PageContext pageContext)
          Constructor.
 
Method Summary
 void dispatch(String path)
          Dispatches a path.
 PageContext getPageContext()
          Returns the page context that originated the request.
 PrintWriter getPrintWriter()
          Returns a print writer to be used to write directly in the response.
 Object[] getRequestObjects()
          Returns the original request objects used to create this request.
 HttpServletResponse getResponse()
          Deprecated. Use getPageContext() or getPrintWriter().
 Writer getWriter()
          Returns a writer to be used to write directly in the response.
 void include(String path)
          Includes the response from the specified URL in the current response output.
 
Methods inherited from class org.apache.tiles.context.TilesRequestContextWrapper
getApplicationContext, getHeader, getHeaderValues, getOutputStream, getParam, getParamValues, getRequest, getRequestLocale, getRequestScope, getSessionScope, getWrappedRequest, isUserInRole
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.tiles.context.TilesRequestContext
getApplicationContext, getHeader, getHeaderValues, getOutputStream, getParam, getParamValues, getRequest, getRequestLocale, getRequestScope, getSessionScope, isUserInRole
 

Constructor Detail

JspTilesRequestContext

public JspTilesRequestContext(TilesRequestContext enclosedRequest,
                              PageContext pageContext)
Constructor.

Parameters:
enclosedRequest - The request that is wrapped here.
pageContext - The page context to use.

JspTilesRequestContext

@Deprecated
public JspTilesRequestContext(ServletContext context,
                                         PageContext pageContext)
Deprecated. Use JspTilesRequestContext(TilesRequestContext, PageContext).

Constructor.

Parameters:
context - The servlet context to use.
pageContext - The page context to use.
Method Detail

dispatch

public void dispatch(String path)
              throws IOException
Dispatches a path. In fact it "includes" it!

Specified by:
dispatch in interface TilesRequestContext
Overrides:
dispatch in class TilesRequestContextWrapper
Parameters:
path - The path to dispatch to.
Throws:
IOException - If something goes wrong during dispatching.
See Also:
ServletTilesRequestContext.dispatch(java.lang.String)

include

public void include(String path)
             throws IOException
Includes the response from the specified URL in the current response output.

Specified by:
include in interface TilesRequestContext
Overrides:
include in class TilesRequestContextWrapper
Parameters:
path - The path to include.
Throws:
IOException - If something goes wrong during inclusion.

getPrintWriter

public PrintWriter getPrintWriter()
                           throws IOException
Returns a print writer to be used to write directly in the response.

Specified by:
getPrintWriter in interface TilesRequestContext
Overrides:
getPrintWriter in class TilesRequestContextWrapper
Returns:
The print writer that writes in the response.
Throws:
IOException - If something goes wrong when getting the print writer.

getWriter

public Writer getWriter()
                 throws IOException
Returns a writer to be used to write directly in the response.

Specified by:
getWriter in interface TilesRequestContext
Overrides:
getWriter in class TilesRequestContextWrapper
Returns:
The writer that writes in the response.
Throws:
IOException - If something goes wrong when getting the writer.

getRequestObjects

public Object[] getRequestObjects()
Returns the original request objects used to create this request.

Specified by:
getRequestObjects in interface TilesRequestContext
Overrides:
getRequestObjects in class TilesRequestContextWrapper
Returns:
The request objects.

getPageContext

public PageContext getPageContext()
Returns the page context that originated the request.

Returns:
The page context.

getResponse

@Deprecated
public HttpServletResponse getResponse()
Deprecated. Use getPageContext() or getPrintWriter().

Returns the response object, obtained by the JSP page context. The print writer will use the object obtained by JspContext.getOut().

Specified by:
getResponse in interface TilesRequestContext
Overrides:
getResponse in class TilesRequestContextWrapper
Returns:
The response object.


Copyright © 2001-2009 Apache Software Foundation. All Rights Reserved.