aspose file tools*
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 EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "jwebplus question" Watch "jwebplus question" New topic
Author

jwebplus question

valli kotari
Greenhorn

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

Given:

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

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
Greenhorn

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: http://aspose.com/file-tools
 
subject: jwebplus question
 
Similar Threads
Classic Tag's
Doubt Enthuware Mock Exam
doubt when compiler error and when exception generate in these questions
regarding custom tags
JWebPlus questions