This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.

Problems running a JSF application as S2AP web module

Jul 29th, 2008, 11:14 AM

Hi,

I have a problem with running a simple JSF sample application as a Web module on S2AP.
What I do is the following:
1. I provide a service library that registers some service in OSGi registry. Works fine - I can deploy the bundle and see the expected state in the OSGi console.
2. I try to write a JSF Web app which is deployed as Web module and which uses the registered OSGi service of the service library.

The generated web.xml on the file system of the SpringSource platform (-> i.e the one under springsource-ap-1.0.0.RC1workcom.springsource.platform.deployerMod ules2ap-services-testapp-web.jar-0s2ap-services-testapp-web.jarMODULE-INFWEB-INF) looks like this - no FacesServlet, etc. contained in there:

Could you try to define the FacesServlet in a web.xml fragment instead of in the manifest? I think this is causing your issue: the Platform seems to wrap it in an HttpServletBean that cannot find the WebApplicationContext, judging from the stacktrace.
The Web-Servlets header has been deprecated since beta 9, so you'll have to do that anyway as support for it will be removed in the final 1.0 release AFAIK.

Comment

I added the FacesServlet to the web.xml fragment of the application and now the generated web.xml in the S2AP "deployer/Module" file system looks better - at least it contains the FacesServlet definition:

Note: for a web module, in contrast to a shared services WAR, you do _not_ need to specify the contextClass or contextConfigLocation context-params. Thus you should not migrate the following entries from your original Web-ContextParams declaration: