org.apache.commons.jelly.tags.http
Class PostTag

java.lang.Object
  extended byorg.apache.commons.jelly.TagSupport
      extended byorg.apache.commons.jelly.tags.http.HttpTagSupport
          extended byorg.apache.commons.jelly.tags.http.PostTag
All Implemented Interfaces:
org.apache.commons.jelly.Tag
Direct Known Subclasses:
MultipartPostTag

public class PostTag
extends HttpTagSupport

A http post

Author:
dion

Field Summary
 
Fields inherited from class org.apache.commons.jelly.TagSupport
body, context, hasTrimmed, parent, shouldTrim
 
Constructor Summary
PostTag()
          Creates a new instance of PostTag
 
Method Summary
 void doTag(org.apache.commons.jelly.XMLOutput xmlOutput)
          Perform the tag functionality.
protected  org.apache.commons.httpclient.HttpMethod getHttpMethod()
          Return a method to be used for post'ing
protected  void setParameters(org.apache.commons.httpclient.HttpMethod method)
          Set the current parameters on the url method ready for processing This method must be called after getHttpUrlMethod
 
Methods inherited from class org.apache.commons.jelly.tags.http.HttpTagSupport
addParameter, addRequestHeader, getParameters, getPath, getRequestHeaders, getResolvedUrl, getUri, getVar, isFollowRedirects, setFollowRedirects, setParameters, setPath, setRequestHeaders, setUri, setVar
 
Methods inherited from class org.apache.commons.jelly.TagSupport
findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, getBody, getBodyText, getBodyText, getContext, getParent, invokeBody, isEscapeText, isTrim, setBody, setContext, setEscapeText, setParent, setTrim, trimBody
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PostTag

public PostTag()
Creates a new instance of PostTag

Method Detail

getHttpMethod

protected org.apache.commons.httpclient.HttpMethod getHttpMethod()
                                                          throws java.net.MalformedURLException
Return a method to be used for post'ing

Specified by:
getHttpMethod in class HttpTagSupport
Returns:
a HttpUrlMethod implementation
Throws:
java.net.MalformedURLException - when the url or path is invalid

setParameters

protected void setParameters(org.apache.commons.httpclient.HttpMethod method)
Set the current parameters on the url method ready for processing This method must be called after getHttpUrlMethod

Overrides:
setParameters in class HttpTagSupport
Parameters:
method - the method to configure

doTag

public void doTag(org.apache.commons.jelly.XMLOutput xmlOutput)
           throws org.apache.commons.jelly.JellyTagException
Description copied from class: HttpTagSupport
Perform the tag functionality. In this case, get the http url method execute it and make it available for validation

Specified by:
doTag in interface org.apache.commons.jelly.Tag
Overrides:
doTag in class HttpTagSupport
Parameters:
xmlOutput - where to send output
Throws:
org.apache.commons.jelly.JellyTagException - when an error occurs


Copyright © 2002-2006 Apache Software Foundation. All Rights Reserved.