I would think there are two ways:

1) Write a jsp with the custom tag in it. The custom tag only does the work and exposes result beans to the jsp for rendering. Keep the whole thing in it's own jsp and then use <c:import ..../> to bring the end result into the main page. Beans in this case only need be exposed to the pageContext as to not pollute request attributes in the main page.

2) Implement freemarker in you taglib to assemble the resulting html.

I would do number 1 if I were designing it -- decomplicates the taglib and makes the formatting updateable without huge efforts.

--David

Nathan Wilhelmi wrote:

Hello - This may be a bit off topic, and if so any recommend pointers to the right place would be great. I really like the reuse aspects of tag libraries, however I don't like doing all the println statements to emit HTML. Feels like there has to be a better way. What I would really like, I think, is a way to embed jsp's in the tablib to handle the HTML output. Sort of like a mini jsp page solution, the difference is that I would like to embed the jsp widgets in the jar for the taglib, rather than coping files into the container directories. Does anyone know of a way or project that does this, or perhaps a better alternative? Something like velocity looks like it might work but I would prefer to stick with one view technology if possible.

Thanks!

-Nate


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to