1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
| package moteur.outils;
import java.io.IOException;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.PageContext;
import javax.servlet.jsp.tagext.BodyTagSupport;
public class MailTagSupport extends BodyTagSupport {
public MailTagSupport(){
super();
}
public int doAfterBody() throws JspException {
try {
if (this.getBodyContent()!= null) {
String body_string = getBodyContent().getString();
System.out.println("fusion : "+body_string);
getBodyContent().getEnclosingWriter().println(body_string);
}
} catch(IOException e) {
throw new JspException(e);
}
return EVAL_PAGE;
}
public int doStartTag() throws JspException {
return EVAL_BODY_BUFFERED;
}
} |