• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jwebplus question

 
valli kotari
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeah even i agree with u.aTagHandler should extend BodyTagSupport in order to return EVAL_BODY_BUFFERED.Is it not?
 
Radmika Arunachalam
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic