myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Kurz <michi.k...@gmx.at>
Subject Re: Faces Servlet and MyFacesServlet (conflictiong) definitions
Date Thu, 22 Jul 2010 19:25:05 GMT
Hi,

with those two servlets and mappings you can use these urls if you have 
.jsp pages:

1) http://localhost:8080/de.vogella.jsf.first/faces/Convertor.jsp
2) http://localhost:8080/de.vogella.jsf.first/Convertor.jsf

Do you see the difference? The first one uses the prefix /faces and the 
real name of the page. The second one internally replaces the extension 
from .jsf to jsp.

But however, normally you don't need more than one FacesServlet.

Regards
Michael

Am 22.07.2010 18:56, schrieb ABOUSSOROR El Arbi:
> Hi,
>
>
>
>    In my generated from eclipse WTP web.xml I have 2 different declaration of
> Faces Servlet:
>
>
>
> <servlet>
>
>      <servlet-name>Faces Servlet</servlet-name>
>
>      <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
>
>      <load-on-startup>1</load-on-startup>
>
>    </servlet>
>
>    <servlet-mapping>
>
>      <servlet-name>Faces Servlet</servlet-name>
>
>      <url-pattern>/faces/*</url-pattern>
>
>    </servlet-mapping>
>
>
>
> .
>
> <servlet>
>
>      <servlet-name>faces</servlet-name>
>
>      <servlet-class>org.apache.myfaces.webapp.MyFacesServlet</servlet-class>
>
>      <load-on-startup>1</load-on-startup>
>
>    </servlet>
>
>    <servlet-mapping>
>
>      <servlet-name>faces</servlet-name>
>
>      <url-pattern>*.jsf</url-pattern>
>
>    </servlet-mapping>
>
>
>
>
>
> So when I try to access to my jsp pages using
> <http://localhost:8080/de.vogella.jsf.first/faces/Convertor.jsf>
> http://localhost:8080/de.vogella.jsf.first/faces/Convertor.jsf I have
> problems (a non ending stack trace) but this using the same url without the
> "/faces":<http://localhost:8080/de.vogella.jsf.first/Convertor.jsf>
> http://localhost:8080/de.vogella.jsf.first/Convertor.jsf it works.
>
>
>
> What I 've understand from these 2 servlet definitions: depending on the
> url, MyFacesServlet or FacesServlet or both will be started. Is it correct ?
>
> And my problem come from the urls that maps the 2 definitions like this one:
> <http://localhost:8080/de.vogella.jsf.first/faces/Convertor.jsf>
> http://localhost:8080/de.vogella.jsf.first/faces/Convertor.jsf
>
>
>
>

Mime
View raw message