|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.servlet.jsp.tagext.TagSupport
javax.servlet.jsp.tagext.BodyTagSupport
org.apache.taglibs.mailer2.PartTag
JSP tag mt:part is used to create a multipart mail. It is used for multipart/alternative HTML and plain text mail alternatives or multipart/digest messages that contain several messages.
It is a child ofmt:mail.
It can have mt:header and mt:attach tags as children.
Multiple mt:parts can be added to a mt:mail tag. The type attribute of mt:mail should then be one of
the multipart/* variants, e.g. multipart/mixed, multipart/related or multipart/alternative. The attachments
inside mt:part and its optional body content are assumed to be multipart/related. This enables the creation of HTML
formatted e-mail. References to images should be be made using cid: URLs.
| Field Summary | |
Logger |
log
Used for logging. |
| Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport |
bodyContent |
| Fields inherited from class javax.servlet.jsp.tagext.TagSupport |
id, pageContext |
| Fields inherited from interface javax.servlet.jsp.tagext.BodyTag |
EVAL_BODY_BUFFERED, EVAL_BODY_TAG |
| 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 |
| Constructor Summary | |
PartTag()
Default zero-arg constructor. |
|
| Method Summary | |
void |
addPart(MimeBodyPart mbp)
Adds an attachment to the list of attachments. |
protected void |
constructMessage(MimePart part,
String type)
Construct a message and add parts to part. |
int |
doAfterBody()
|
int |
doEndTag()
|
int |
doStartTag()
|
String |
getBody()
Returns the body content. |
String |
getContentType()
Returns the content-type of this part, possibly including character set. |
String |
getEncoding()
Returns the character set for the body content of this part. |
HashMap |
getHeaders()
Returns the additional headers set in this part. |
ArrayList |
getParts()
Returns the parts that have been added to this part. |
String |
getType()
Returns the MIME type of this part. |
void |
release()
|
void |
setBody(String body)
Sets the body attribute. |
void |
setEncoding(String encoding)
Sets the character set for this part. |
protected void |
setHeader(String name,
String value)
Set the name and value of any extra headers to be set in this part. |
void |
setType(String type)
Sets the content-type for this part. |
| Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport |
doInitBody, getBodyContent, getPreviousOut, setBodyContent |
| Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, resetCustomAttributes, setId, setPageContext, setParent, setValue |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.servlet.jsp.tagext.Tag |
getParent, setPageContext, setParent |
| Field Detail |
public Logger log
| Constructor Detail |
public PartTag()
| Method Detail |
public int doStartTag()
throws JspException
JspException
public int doAfterBody()
throws JspException
JspException
public int doEndTag()
throws JspException
JspExceptionpublic void release()
protected void constructMessage(MimePart part,
String type)
throws MessagingException
part - The MimePart to add the parts totype - The MIME Type of this part, one of "multipart/related", "multipart/mixed", "multipart/alternative", etc if more than one part are to be added.
MessagingException - Upon errorpublic void addPart(MimeBodyPart mbp)
mbp - The MimeBodyPart to be added to this part
protected void setHeader(String name,
String value)
name - The name of the headervalue - The value of the headerpublic String getContentType()
public String getBody()
public void setBody(String body)
body - The body contentpublic void setEncoding(String encoding)
encoding - string that is the character set for this emailpublic void setType(String type)
type - the content-type for this part, e.g. text/plain or multipart/related.public String getType()
public String getEncoding()
public ArrayList getParts()
public HashMap getHeaders()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||