Downloading worked well in 2.1.A1 but ceased to work in 2.1.BETA. Now the following code
Component.getInstance(DocumentService.class, true);
throws an exceptions which tells that the application context is not active.
components.xml contains the following filter declarations:
<web:exception-filter url-pattern="*.seam" /> <web:redirect-filter url-pattern="*.seam" /> <web:context-filter url-pattern="/content/*" /> <web:multipart-filter create-temp-files="true" max-request-size="0" url-pattern="*.seam" />
web.xml contains the following servlet mapping:
<servlet> <servlet-name>contentDownload</servlet-name> <servlet-class>org.tgm.ContentDownloadServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>contentDownload</servlet-name> <url-pattern>/content/file/*</url-pattern> </servlet-mapping>
I tried to debug ContextFilter.doFilter method but it is not called.
Suggestions? What may cause the problem?
Having read Reference I realized that I missed Seam Filter mapping for my servlet URL patten. Additinal mapping for Seam Filter with "/content/*" pattern solved the problem.