From: Marc P. <ma...@an...> - 2005-05-24 15:42:29
|
I'm off home now from work but I just had an idea I need to get down... The problem with both the Spring view implementation for WM and the WM JSP Taglib is that they can only access the ServletContext, and all the methods to access individual servlets are deprecated. Therefore we cannot be sure we can get to the servlets' classloader. However... we can access context attributes. So we could define a special WM context attribute such as "webmacro.template.classloader" - and anybody who wants to use these the taglib or Spring view can just make their servlet set this context attribute at startup to the servlet's ClassLoader. I can then make ServletContextBroker look for this magic value and use it if it is found, or default to the classloader that loaded WM if not. What do you think? Cheers |