Red Hat NETSCAPE ENTERPRISE SERVER 6.1 - PROGRAMMER GUIDE TO SERVLETS Installation Guide Page 7

  • Download
  • Add to my manuals
  • Print
  • Page
    / 72
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 6
Whats New in iPlanet Web Server, Version 4.1
7
* Collect attributes and call into some actions
*
* <foo att1="..." att2="...." att3="...." />
*/
public class FooTag
extends ExampleTagBase
implements BodyTag
{
private String atts[] = new String[3];
int i = 0;
private final void setAtt(int index, String value) {
atts[index] = value;
}
public void setAtt1(String value) {
setAtt(0, value);
}
public void setAtt2(String value) {
setAtt(1, value);
}
public void setAtt3(String value) {
setAtt(2, value);
}
/**
* Process start tag
*
* @return EVAL_BODY_INCLUDE
*/
public int doStartTag() {
return EVAL_BODY_TAG;
}
public void doInitBody() throws JspException {
pageContext.setAttribute("member", atts[i]);
i++;
}
public int doAfterBody() throws JspException {
try {
if (i == 3) {
bodyOut.writeOut(bodyOut.getEnclosingWriter());
return SKIP_BODY;
} else
Page view 6
1 2 3 4 5 6 7 8 9 10 11 12 ... 71 72

Comments to this Manuals

No comments