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

Confirmation About Classic Tags required?

 
Gowher Naik
Ranch Hand
Posts: 643
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HFS&JSP says in classic tags if body content is empty then youmust return SKIP_BODY from doStartTag() method.
Does it mean if you set
<body-content>empty</body-content>
and doStartTag() returns BodyTag.EVAL_BODY_INCLUDE
then it will thrown exception.
is it so?
i have tried above but it doesnot throw exception only doAfterBody method is skipped.

Thanks
 
Dilshan Edirisuriya
Ranch Hand
Posts: 299
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think it's because of your container. Some friendly containers recognize some tags and does processing their own. Correct me if I'm wrong.
 
rohini gundu
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have also tried that example on my local machine.
But it doesnt show any error.It just skips doAfterBody() method.
 
Celinio Fernandes
Ranch Hand
Posts: 549
Eclipse IDE Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That is weird.
If you specify in the TLD :

and that you put something in the body of the tag in the JSP,
then you should get a runtime exception specifying that the body should be empty.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic