Every example i can find has the tag handler java class generating html and spewing it out with out.print(someHTML);
Is there a way to include a jsp and add attributes to the request instead?
Every example i can find has the tag handler java class generating html and spewing it out with out.print(someHTML);
Is there a way to include a jsp and add attributes to the request instead?
Try a JSP custom tag file; here's a simple example using an attribute.
Tag files have to live under WEB-INF/tags, so in WEB-INF/tags/makebold.tag:
In boldtest.jsp:
I read up on tag files here and here.
I haven't tried this but it should be possible by obtaining a RequestDispatcher from the Request object:
The PageContext also has an include method but that seems to only work for static files, not jsps.