| Author |
How to get body-content value in my custom tag?
|
somjet thana
Greenhorn
Joined: May 17, 2006
Posts: 7
|
|
in jsp file How to get body-content(name) value in MyTag.doTag(), if MyTag extends SimpleTagSupport? Thanks Somjet
|
 |
Christophe Verré
Sheriff
Joined: Nov 24, 2005
Posts: 14672
|
|
If you want to simply output the body : If you want to do something with the body :
|
[My Blog]
All roads lead to JavaRanch
|
 |
somjet thana
Greenhorn
Joined: May 17, 2006
Posts: 7
|
|
and how to get only string value of body-content in doTag()
|
 |
Christophe Verré
Sheriff
Joined: Nov 24, 2005
Posts: 14672
|
|
|
Call the StringWriter#toString method.
|
 |
somjet thana
Greenhorn
Joined: May 17, 2006
Posts: 7
|
|
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
Joined: Nov 24, 2005
Posts: 14672
|
|
|
They all sound badly written. Where did you get them from ?
|
 |
somjet thana
Greenhorn
Joined: May 17, 2006
Posts: 7
|
|
|
it is my doubt.
|
 |
 |
|
|
subject: How to get body-content value in my custom tag?
|
|
|