[jboss-user] [JBoss Seam] - Re: Getting the Seam context in a Filter

shane.bryzak@jboss.com do-not-reply at jboss.com
Wed Oct 17 21:11:07 EDT 2007


Don't configure the context filter for standard Seam URL's (i.e. *.seam), you need to configure it for your custom servlet.  Take a look at the seamspace example, it uses a context filter to provide a content servlet (ContentServlet.java) access to the Seam contexts for the purpose of returning binary image data.

The configuration for this is in web.xml:

    <servlet>
  |         <servlet-name>Content Servlet</servlet-name>
  |         <servlet-class>org.jboss.seam.example.seamspace.ContentServlet</servlet-class>
  |     </servlet>
  |     
  |     <servlet-mapping>
  |         <servlet-name>Content Servlet</servlet-name>
  |         <url-pattern>/content/*</url-pattern>
  |     </servlet-mapping>

and in components.xml:


    <web:context-filter url-pattern="/content/*"/>



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

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



More information about the jboss-user mailing list