[jboss-dev-forums] [Design of JBoss Portal] - Re: MetaBridge

stan.silvert@jboss.com do-not-reply at jboss.com
Wed Jul 11 12:08:30 EDT 2007


"julien at jboss.com" wrote : Thanks Stan, however I precisely want to avoid to declare the servlet faces in web.xml in order to avoid to have the servlet container use the class already provided by the Java EE environment.
  | 
  | that's why I would prefer plain delegation.

OK.  I understand now.

In that case I think you would just need to set the context classloader in the init() method of your filter.  I think that the filter is guaranteed to be loaded before the servlet, or maybe you can configure it that way using <load-on-startup>.

That way, the filter sets the context classloader in both init() and in doFilter().  When the application loader tries to load FacesServlet it will load the one in your WAR instead of the one that ships with the container.

I think that should work and it would be easier than wrapping the FacesServlet.  

I'm a little weary of not declaring the FacesServlet in web.xml.  I know that MyFaces relies on it to discover whether the application is path mapped or extension mapped.

Stan

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4063079#4063079

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4063079



More information about the jboss-dev-forums mailing list