This week's book giveaway is in the Other Languages forum. We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line! See this thread for details.
How to use WriteTag (bean:write) within Custom Tag
posted 10 years ago
Hello, I am trying to write a custom tag in which I am trying to use the <bean:write..> tag's class so that it would actually generate the bean:write when my custom tag is used. The way I am doing it is something like this in my custom tag's doStartTag() method: WriteTag wt = new WriteTag(); wt.setName("user_rec"); wt.setProperty("userName"); wt.doStartTag(); wt.doEndTag(); wt.release();
The user_rec is set in my request (using request.setAttribute). Is it possible to do soemthig like this? if yes, how as I keep getting an exception when I try to use somethig like this. This is what I get: