File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes jwebplus question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "jwebplus question" Watch "jwebplus question" New topic

jwebplus question

valli kotari

Joined: Jul 08, 2005
Posts: 4
Hi, this is a question from JWebPlus.


<%@ taglib uri="example" prefix="example" %>
<%="Body Content"%>

If the aTagWithBody handler extends from TagSupport and returns EVAL_BODY_BUFERED from doStartTag(),what will it print?

select one correct option
a)the tag handler class would not compile
b)an exception at request time
c)"Body Content" will be printed

he gave the answer b
but i thought it is a

can anyone help?
david carrasco

Joined: Oct 25, 2004
Posts: 17
Yes I thinking the answer correct is B
"b)an exception at request time"

because aTagWithBody handler extends from TagSupport y the handler must extends from BodyTagSupport

I hope someone can to help with my answer
please :roll:
Divya Guttikonda
Ranch Hand

Joined: Mar 09, 2005
Posts: 47
Yeah even i agree with u.aTagHandler should extend BodyTagSupport in order to return EVAL_BODY_BUFFERED.Is it not?
Radmika Arunachalam
Ranch Hand

Joined: Mar 29, 2004
Posts: 45
I agree with u all, according to your answers, it should give compilation error (EVAL_BODY_BUFFERED not defined..) not error at request time ... So answer a is correct. AM i correct?
I agree. Here's the link:
subject: jwebplus question
jQuery in Action, 3rd edition