org.apache.taglibs.io
Class URLTag
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
org.apache.taglibs.io.AbstractTag
org.apache.taglibs.io.URLTag
- All Implemented Interfaces:
- java.io.Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.Tag, PipeConsumer, PipeProducer
- Direct Known Subclasses:
- HttpTag
public class URLTag
- extends AbstractTag
- implements PipeProducer, PipeConsumer
A JSP Custom tag to make a URL request and output the response.
- Version:
- $Revision$
- Author:
- James Strachan
- See Also:
- Serialized Form
Fields inherited from class javax.servlet.jsp.tagext.TagSupport |
id, pageContext |
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag |
EVAL_BODY_AGAIN |
Fields inherited from interface javax.servlet.jsp.tagext.Tag |
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE |
Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
URLTag
public URLTag()
addHeader
public void addHeader(java.lang.String name,
java.lang.String value)
throws javax.servlet.jsp.JspException
- Adds a HTTP header to the current request
- Throws:
javax.servlet.jsp.JspException
addParameter
public void addParameter(java.lang.String name,
java.lang.String value)
- Adds a HTTP query parameter to the current url
setWriter
public void setWriter(java.io.Writer writer)
- Specified by:
setWriter
in interface PipeProducer
setReader
public void setReader(java.io.Reader reader)
- Specified by:
setReader
in interface PipeConsumer
doStartTag
public int doStartTag()
throws javax.servlet.jsp.JspException
- Specified by:
doStartTag
in interface javax.servlet.jsp.tagext.Tag
- Overrides:
doStartTag
in class javax.servlet.jsp.tagext.TagSupport
- Throws:
javax.servlet.jsp.JspException
doEndTag
public int doEndTag()
throws javax.servlet.jsp.JspException
- Specified by:
doEndTag
in interface javax.servlet.jsp.tagext.Tag
- Overrides:
doEndTag
in class javax.servlet.jsp.tagext.TagSupport
- Throws:
javax.servlet.jsp.JspException
release
public void release()
- Specified by:
release
in interface javax.servlet.jsp.tagext.Tag
- Overrides:
release
in class javax.servlet.jsp.tagext.TagSupport
setUrl
public void setUrl(java.lang.String url)
setOutput
public void setOutput(boolean output)
setInput
public void setInput(boolean input)
setEncoding
public void setEncoding(java.lang.String encoding)
- Sets the character encoding
getURLWriter
public java.io.Writer getURLWriter()
throws java.io.IOException
- Throws:
java.io.IOException
getURLOutputStream
public java.io.OutputStream getURLOutputStream()
throws java.io.IOException
- Throws:
java.io.IOException
getURLReader
public java.io.Reader getURLReader()
throws java.io.IOException
- Throws:
java.io.IOException
getURLInputStream
public java.io.InputStream getURLInputStream()
throws java.io.IOException
- Throws:
java.io.IOException
getConnection
protected java.net.URLConnection getConnection()
throws java.io.IOException
- Throws:
java.io.IOException
configureConnection
protected void configureConnection(java.net.URLConnection connection)
throws java.io.IOException
- Throws:
java.io.IOException
disconnect
protected void disconnect(java.net.URLConnection connection)
readURL
protected void readURL()
throws java.io.IOException,
javax.servlet.jsp.JspException
- Throws:
java.io.IOException
javax.servlet.jsp.JspException
Copyright ? 2000-2004 The Apache Software Foundation. All Rights Reserved.