This is much easier in Seam2, if you can use it...
@Scope(APPLICATION)
| @Name("myFilter")
| @BypassInterceptors
| @Filter(within="org.jboss.seam.web.ajax4jsfFilter")
| public class MyFilter extends AbstractFilter {
|
| public void doFilter(final ServletRequest request, final ServletResponse response,
final FilterChain chain) throws IOException, ServletException {
| new ContextualHttpServletRequest( (HttpServletRequest) request ) {
| public void process() throws ServletException, IOException
| {
| // Do your work
| }
| }.run();
| }
| }
If you are stuck on Seam 1.2, then you don't havve @Filter and you don't have
ContextualHttpServletRequest, so mark your filter with @Name and @Startup, and do the
Lifecycle setup and teardown yourself (look at filters in org.jboss.seam.web for how to do
this).
You can configure it using components.xml as usual (just add getters and setters).
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4077077#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...