The problem is that the Tag is not evaluating the contents in getURL() but is representing it "<customTag><% mywriter.write(out); %></customTag>" How can I make the custom reevaluate the contents of the other tag as well? Thanks in advance.
Never be satisfied with anything less than the best and you will surely pass the test...
You can't. Custom tags are evaluated and translated into code during the translation phase of the JSP life cycle. Your call to getURL() is not executed until the execution phase.
In order to cause a custom tag to be evaluated it must be part of a JSP. You might want to investigate the request dispatcher include mechanism, or tag files (if you are using JSP 2.0).
Thanks for the answer. As I had mentioned, I have a Cutomer tag <tag1>. In the tag I am trying to write to the stream another tag, <tag2> with out.write("<tag2");
This does not seem to work even if the page references the tld that contains the tag. Thanks.
Never be satisfied with anything less than the best and you will surely pass the test...
No. As I said, any custom tag that you emit as text will remain just that: text.
If you want to dynamically include a custom tag in another, you need to put the nested tag in a JSP file that can be included via the request dispatcher.
Hi Bear. I liked what you wrote and am trying to work with it. I was if it could be posssible to include different taglets on the same page with pageInclude? For example,
If not can you suggest a way this could be accomplished?
Thanks....
Never be satisfied with anything less than the best and you will surely pass the test...