This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jwebplus question

 
valli kotari
Greenhorn
Posts: 4
  • 0
  • 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
  • 0
  • 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
  • 0
  • 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
  • 0
  • 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?
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic