From: Keats K. <ke...@xa...> - 2005-05-24 16:00:56
|
I don't like the "smell" of this. Why do you need it anyway? If you need the Servlet instance you can just use: (Servlet)pageContext.getPage() Anyway, I thought you didn't need to use the Servlet instance if you use the new Broker -- wasn't that the point? Keats Marc Palmer wrote: >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 > > > > |