posted 18 years ago
Hello all,
here is a question,
public class ForumTagHandler extends TagSupport {
private int totalTopics = 0;
public int doStartTag() throws JspException {
if (totalTopics > 40)
return EVAL_BODY_AGAIN;
else
return SKIP_BODY; }}
options are -
1. The body of the tag is evaluated again.
2. The body of the tag is skipped.
3. SKIP_BODY is not a valid return code.
4. EVAL_BODY_AGAIN is not a valid return code.
5. JspException is not handled in the doStartTag() method.
The ans is given 4..
I dont understand why so..as the condition is false it should return skip_body ...
one more thing,isint Eval _body_Include a valid return type of doStartTag()?? as this class inherits this field from Tag Interface...
mallika