On 9/12/2020 2:15 AM, Mark Thomas wrote:
On 12/09/2020 00:30, Adam Rauch wrote:
I have implemented a custom JspWriter and registered it for use by our
JSPs using the approach described here:
https://stackoverflow.com/questions/29508245/jsp-using-a-delegate-for-out-jspwriter-with-jsp-includes-to-change-the-beh


I created a custom JspFactory that returns a custom JspContext that
returns my custom JspWriter. I then replaced the standard JspFactory by
calling JspFactory.setDefaultFactory(). This works, though it results in
some undesired behavior. I also note that the setDefaultFactory()
JavaDoc seems to claim that my approach is "illegal".

So, is there a preferred way for my web application to provide a custom
JspWriter for my JSPs to use?
How about using an include-prelude mapped to all JSPs to wrap the
default JspWriter with the custom writer?

Mark

This works great... much cleaner than my previous approach. Thanks for the suggestion, Mark!

Adam


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to