|
|||||||||
| 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.AttachTag
JSP tag mt:attach is used to add attachments.
It is a child ofmt:mail or mt:part.
Either the url, or the file or both name and type attributes should be present.
If the url attribute is present, the name and type are derived from the HTTP response.
If the filename attribute is present, the name and type are also automatically derived.
If both name and type are present, the body content of the tag is added as an attachment.
| 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 | |
AttachTag()
Default zero-arg constructor. |
|
| Method Summary | |
int |
doAfterBody()
|
int |
doEndTag()
|
int |
doStartTag()
|
String |
getBody()
Returns the body content. |
String |
getContentType()
Returns a complete content-type header with encoding. |
String |
getEncoding()
Returns the character set of the body content of this attachment. |
String |
getFilename()
Returns the filename of the attachment. |
MimeMessage |
getMessage()
Returns the Message object. |
String |
getName()
Returns the name of the attachment under which it can be saved. |
String |
getType()
Returns the MIME type of the attachment. |
String |
getUrl()
Returns the URL of the attachment. |
void |
release()
|
void |
setBody(String body)
Sets the body attribute. |
void |
setEncoding(String encoding)
Sets the encoding attribute. |
void |
setFilename(String filename)
Sets the filename attribute. |
void |
setMessage(MimeMessage message)
Set an entire Message object as an attachment. |
void |
setName(String name)
Sets the name attribute. |
void |
setType(String type)
Sets the MIME type for this attachment. |
void |
setUrl(String url)
Retrieves the resource indicated by this URL as an attachment. |
| 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 AttachTag()
| Method Detail |
public int doStartTag()
throws JspException
JspException
public int doAfterBody()
throws JspException
JspException
public int doEndTag()
throws JspException
JspExceptionpublic void release()
public String getBody()
public void setBody(String body)
body - The body contentpublic String getContentType()
public void setEncoding(String encoding)
encoding - The character setpublic void setFilename(String filename)
filename - The filename to setpublic void setMessage(MimeMessage message)
message - The Message to attachpublic void setName(String name)
name - The name of the attachmentpublic void setType(String type)
type - The MIME typepublic void setUrl(String url)
url - full url (including http://), from the resource to be addedpublic String getType()
public String getUrl()
public String getFilename()
public String getName()
public String getEncoding()
public MimeMessage getMessage()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||