Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Classic Tag Quesion

 
Kay Li
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
# Assume that everything is declared properly and the TLD specifies <body-content>scriptless</body-content>. What is the output of the JSP? (1 correct answer)





1. (Before)(After)
2. (Before)
3. (Before)My Body(After)
4. (Before)My Body

Answer: 3

But I think it should be 2

Can some one help?

Thanks

Kay
 
Sebastian Janisch
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
SKIP_PAGE is an invalid return value for doStartTag(). SKIP_PAGE will cause the rest of the page to be skipped when returned from doEndTag(), since you don't override this one, the TagSupports default implementation comes in which returns EVAL_PAGE
 
geeta vemula
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok but if we return SKIP_PAGE from doStartTag() then does't it show any compiler error?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok but if we return SKIP_PAGE from doStartTag() then does't it show any compiler error?

SKIP_PAGE is an int. It won't cause a compile error.
 
geeta vemula
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
even if it is int, then how it decides its next step in the lifecycle? whether to skip body or to eval body?
 
Chinmaya Chowdary
Ranch Hand
Posts: 434
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Geeta. If you see the generated source file, it will be clear.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic