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

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
              extended byorg.apache.commons.jelly.tags.http.MultipartPostTag
All Implemented Interfaces:
org.apache.commons.jelly.Tag

public class MultipartPostTag
extends PostTag

A Multipart MIME message post This tag should contain one or more <part> tags, to specify the multiple parts of the message Example:

   <mppost uri="http://localhost?doit">
       <part name="user" type="text/plain">Fred</part>
       <part name="data"  type="text/plain">This is the second part of the message</part>
   </mppost>

Since:
???
Author:
Bill Keese

Field Summary
 
Fields inherited from class org.apache.commons.jelly.TagSupport
body, context, hasTrimmed, parent, shouldTrim
 
Constructor Summary
MultipartPostTag()
          Creates a new instance of MppostTag
 
Method Summary
 void addPart(org.apache.commons.httpclient.methods.multipart.Part p)
          Add a part to the message
protected  org.apache.commons.httpclient.HttpMethod getHttpMethod()
          Return a method to be used for multi-part post'ing
protected  void setParameters(org.apache.commons.httpclient.HttpMethod method)
          Set the current parameters on the url method ready for processing This method basically It must be called after getHttpUrlMethod
 
Methods inherited from class org.apache.commons.jelly.tags.http.PostTag
doTag
 
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

MultipartPostTag

public MultipartPostTag()
Creates a new instance of MppostTag

Method Detail

getHttpMethod

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

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

addPart

public void addPart(org.apache.commons.httpclient.methods.multipart.Part p)
Add a part to the message


setParameters

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

Overrides:
setParameters in class PostTag


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