Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to get body-content value in my custom tag?

 
somjet thana
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in jsp file


How to get body-content(name) value in MyTag.doTag(), if MyTag extends SimpleTagSupport?

Thanks
Somjet
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you want to simply output the body :


If you want to do something with the body :
 
somjet thana
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
and how to get only string value of body-content in doTag()
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Call the StringWriter#toString method.
 
somjet thana
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks.
with jsp code


Which is the correct use of EL(${name})?

1.use ${name} to input name param to doTag()
2.use ${name} to display name when we use getJspContext().setAttribute("name", "tom")
3.all correct

thanks
somjet
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
They all sound badly written. Where did you get them from ?
 
somjet thana
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
it is my doubt.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic