org.apache.struts.taglib.bean

Class IncludeTag

public class IncludeTag extends TagSupport

Define the contents of a specified intra-application request as a page scope attribute of type java.lang.String. If the current request is part of a session, the session identifier will be included in the generated request, so it will be part of the same session.

FIXME: In a servlet 2.3 environment, we can use a wrapped response passed to RequestDispatcher.include().

Version: $Rev: 54929 $ $Date: 2004-10-16 17:38:42 +0100 (Sat, 16 Oct 2004) $

Field Summary
protected Stringanchor
The anchor to be added to the end of the generated hyperlink.
protected static intBUFFER_SIZE
Buffer size to use when reading the input stream.
protected Stringforward
The name of the global ActionForward that contains a path to our requested resource.
protected Stringhref
The absolute URL to the resource to be included.
protected Stringid
The name of the scripting variable that will be exposed as a page scope attribute.
protected static MessageResourcesmessages
The message resources for this package.
protected Stringpage
The context-relative URI of the page or servlet to be included.
protected booleantransaction
Include transaction token (if any) in the hyperlink?
protected booleanuseLocalEncoding
Method Summary
protected voidaddCookie(URLConnection conn, String urlString, HttpServletRequest request)
Add a session id cookie if appropriate.
intdoStartTag()
Define the contents returned for the specified resource as a page scope attribute.
StringgetAnchor()
StringgetForward()
StringgetHref()
StringgetId()
StringgetPage()
booleangetTransaction()
booleanisUseLocalEncoding()
voidrelease()
Release all allocated resources.
voidsetAnchor(String anchor)
voidsetForward(String forward)
voidsetHref(String href)
voidsetId(String id)
voidsetName(String name)
Deprecated method to set the "name" attribute, which has been replaced by the "page" attribute.
voidsetPage(String page)
voidsetTransaction(boolean transaction)
voidsetUseLocalEncoding(boolean b)

Field Detail

anchor

protected String anchor
The anchor to be added to the end of the generated hyperlink.

BUFFER_SIZE

protected static final int BUFFER_SIZE
Buffer size to use when reading the input stream.

forward

protected String forward
The name of the global ActionForward that contains a path to our requested resource.

href

protected String href
The absolute URL to the resource to be included.

id

protected String id
The name of the scripting variable that will be exposed as a page scope attribute.

messages

protected static MessageResources messages
The message resources for this package.

page

protected String page
The context-relative URI of the page or servlet to be included.

transaction

protected boolean transaction
Include transaction token (if any) in the hyperlink?

useLocalEncoding

protected boolean useLocalEncoding

Method Detail

addCookie

protected void addCookie(URLConnection conn, String urlString, HttpServletRequest request)
Add a session id cookie if appropriate. Can be overloaded to support a cluster.

Parameters: conn urlString request

Since: Struts 1.2.0

doStartTag

public int doStartTag()
Define the contents returned for the specified resource as a page scope attribute.

Throws: JspException if a JSP error occurs

getAnchor

public String getAnchor()

getForward

public String getForward()

getHref

public String getHref()

getId

public String getId()

getPage

public String getPage()

getTransaction

public boolean getTransaction()

isUseLocalEncoding

public boolean isUseLocalEncoding()

release

public void release()
Release all allocated resources.

setAnchor

public void setAnchor(String anchor)

setForward

public void setForward(String forward)

setHref

public void setHref(String href)

setId

public void setId(String id)

setName

public void setName(String name)

Deprecated: use setPage(String) instead

Deprecated method to set the "name" attribute, which has been replaced by the "page" attribute.

setPage

public void setPage(String page)

setTransaction

public void setTransaction(boolean transaction)

setUseLocalEncoding

public void setUseLocalEncoding(boolean b)
Copyright B) 2000-2008 - The Apache Software Foundation