You seem to have the Faces servlet defined twice: as "Faces Servlet" and
"faces" while only having the "Faces Servlet" mapped to a path (*.jsf)
-- see bold sections below. Alas, the bridge uses a simple parser which
only expects to find one servlet defintion for Faces. Since "faces" is
the last one it encounters and there is no mapping for it I suspect this
is the reason you are getting the error. Try/Fix this by removing the
duplicate entry and let me know. If there is some reason you need to
keep both please let me know and I can look at fixing this in the bridge.*
<!-- Faces Servlet -->
<servlet>
<servlet-name>faces</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
</servlet> *
On 5/26/2010 6:38 AM, Yves Deschamps wrote:
I have this error:
Caused by: javax.portlet.faces.BridgeException: BridgeImpl.init():
unable to determine Faces servlet web.xml mapping.
at
org.apache.myfaces.portlet.faces.bridge.BridgeImpl.init(BridgeImpl.java:204)
at
javax.portlet.faces.GenericFacesPortlet.initBridge(GenericFacesPortlet.java:562)
with this web.xml. Have you an idea ?
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.5"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<display-name>esup-annuaire-mobile</display-name>
<context-param>
<param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
<param-value>resources.application</param-value>
</context-param>
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>client</param-value>
</context-param>
<!--
Trinidad also supports an optimized strategy for caching some view
state at an application level, which significantly improves
scalability. However, it makes it harder to develop (updates to
pages
will not be noticed until the server is restarted), and in some
rare
cases cannot be used for some pages (see Trinidad documentation
for
more information)
-->
<context-param>
<param-name>org.apache.myfaces.trinidad.USE_APPLICATION_VIEW_CACHE</param-name>
<param-value>false</param-value>
</context-param>
<!--
If this parameter is enabled, Trinidad will automatically check
the
modification date of your JSPs, and discard saved state when they
change; this makes development easier, but adds overhead that
should
be avoided when your application is deployed
-->
<context-param>
<param-name>org.apache.myfaces.trinidad.CHECK_FILE_MODIFICATION</param-name>
<param-value>true</param-value>
</context-param>
<!--
Enables Change Persistence at a session scope. By default, Change
Persistence is entirely disabled. The ChangeManager is an API,
which
can persist component modifications (like, is a showDetail or tree
expanded or collapsed). For providing a custom Change Persistence
implementation inherit from the Trinidad API's ChangeManager
class. As
the value you have to use the fullqualified class name.
-->
<context-param>
<param-name>org.apache.myfaces.trinidad.CHANGE_PERSISTENCE</param-name>
<param-value>session</param-value>
</context-param>
<filter>
<filter-name>trinidad</filter-name>
<filter-class>org.apache.myfaces.trinidad.webapp.TrinidadFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>trinidad</filter-name>
<servlet-name>faces</servlet-name>
</filter-mapping>
<!-- for Spring -->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
* <servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<!-- Faces Servlet -->
<servlet>
<servlet-name>faces</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
</servlet> *
<!-- resource loader servlet -->
<servlet>
<servlet-name>resources</servlet-name>
<servlet-class>org.apache.myfaces.trinidad.webapp.ResourceServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>resources</servlet-name>
<url-pattern>/adf/*</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>15</session-timeout>
</session-config>
<context-param>
<param-name>org.apache.myfaces.ERROR_HANDLING</param-name>
<param-value>false</param-value>
</context-param>
<error-page>
<error-code>500</error-code>
<location>/errordisplay.jsp</location>
</error-page>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
<login-config>
<auth-method>BASIC</auth-method>
</login-config>
<!-- ESSAI PORTLET -->
<servlet>
<servlet-name>esup-annuaire-mobile</servlet-name>
<servlet-class>org.apache.pluto.core.PortletServlet</servlet-class>
<init-param>
<param-name>portlet-class</param-name>
<param-value>org.apache.portals.bridges.portletfilter.FilterPortlet</param-value>
</init-param>
<init-param>
<param-name>portlet-guid</param-name>
<param-value>esup-annuaire-mobile.EsupAnnuaireMobilePortlet</param-value>
</init-param>
<init-param>
<param-name>portlet-name</param-name>
<param-value>EsupAnnuaireMobilePortlet</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>esup-annuaire-mobile</servlet-name>
<url-pattern>/PlutoInvoker/EsupAnnuaireMobilePortlet</url-pattern>
</servlet-mapping>
</web-app>