2 Replies Latest reply on Feb 27, 2007 2:09 AM by Carsten Hoehne

    How to configure Seam correctly (Seam1.1.7RC1 and filter map

    Carsten Hoehne Master

      Chapter 19 (for Seam 1.1.6) and Chapter 20(Seam 1.1.7RC1) are somewhat different.
      Filters are configured in web.xml (1.1.6) or components.xml(1.1.7)
      This is achieved through a so called master filter, when i understand it correctly.
      It seems that i can use my old seam configuration also with seam 1.1.7.
      My question is about using seam together with ajax4jsf:

      When someone downloads (https://ajax4jsf.dev.java.net/nonav/ajax/ajax-jsf/download.html#binary) ajax4jsf a page is shown where the ajax4jsf filter is configured via servlet mapping. Also there is this note:

      Note: If you have other filters declared in the web.xml, be sure that Ajax4jsf Filter is declared before the others.

      There is a little pitfall here. If you configure ajax4jsf as suggested on the download page and all other filters via url mapping, the ajax filter will be the last. This is due to the priority rules in the servlet spec.

      In my web.xml servlet mapping is used for all my filters mapped to the Faces Servlet. Is this approch recommended? And how can i use it with the new functionality introduced with seam1.1.7RC1? Which dispatchers are required? Is the config below correct?
       <filter-name>Seam Filter</filter-name>
       <servlet-name>Faces Servlet</servlet-name>

      The benefit of sevlet mapping is:
      There is only one point where the url pattern is specified. Changes are easier.
      For me i would suggest to use servlet mappings for seam (in the examples and in the docs) if this is conform with seam1.1.7

      Thanks for reading so far. I am eager to read your feedback.