You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Jeff Bischoff <jb...@klkurz.com> on 2007/02/02 19:01:40 UTC

/faces/* servlet mapping and welcome files

Hey guys, quick question:

Does anyone have welcome files working successfully with the /faces/* 
servlet mapping? I previously used a *.faces extension mapping, and had 
welcome files working with a dummy index.faces file. But now I am 
converting to facelets and followed the advice from the archives to get 
them to coexist [1]. Now that I'm using /faces/* I have both facelets 
and JSP working just fine together except my welcome-file doesn't work 
(results in a blank page shown). I've tried different paths combinations 
in the welcome-file-list, with no luck so far. Latest entry is pasted 
below. Thanks for any tips!

<welcome-file-list>
    <!-- OLD <welcome-file>pages/public/index.faces</welcome-file>-->
    <welcome-file>faces/pages/public/index.xhtml</welcome-file>
</welcome-file-list>

[1] http://www.nabble.com/Facelets-tf2005321.html#a5509212

Regards,

Jeff Bischoff
Kenneth L Kurz & Associates, Inc.



Re: /faces/* servlet mapping and welcome files

Posted by Jeff Bischoff <jb...@klkurz.com>.
*smacks his own forehead* guys, my BROWSER was caching the dummy file. 
It was serving that up, even after I deleted it from the project and 
cleared out my JBoss temp folders! Talk about a headache!!

Well, now I can finally get back to trying your suggestions...

Romanowski, Tim wrote:
> Interesting...my redirect is this:
> <jsp:forward page="/faces/index2.xhtml"/>
> 
> Admittedly, I'm not an expert on the mappings and how the values in web.xml
> are supposed to be handled.  But this does work for me on various builds of
> Glassfish V2.  
> 
> However, I did note this, which may explain why mine is working:
>     <!-- Use prefix-mapping instead of suffix-mapping.
>          This allows us to support both *.xhtml and *.jsp files -->
>     <context-param>
>         <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
>         <param-value>/faces/*</param-value>
>     </context-param>
> 
> Now that I think about it, I wonder -- despite working, is this a bad
> approach?
> 
> Tim
> 
> -----Original Message-----
> From: Jeff Bischoff [mailto:jbischoff@klkurz.com] 
> Sent: Friday, February 02, 2007 2:48 PM
> To: MyFaces Discussion
> Subject: Re: /faces/* servlet mapping and welcome files
> 
> What do you redirect to? /faces/myfile.xhtml?
> 
> Actually I can't get this working either. I've discovered that "blank 
> page" coming up is actually my index.faces dummy file! When I view the 
> source, I see the comment I wrote in there.
> 
> So why would it be going there when I commented out the extension 
> mapping? Does JBoss treats commented-out items in web.xml as if they are 
> not commented?
> 
> Some relevent parts of web.xml:
> --------------------------------
> <!-- Use Documents Saved as *.xhtml
>      <context-param>
>      	<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
>      	<param-value>.xhtml</param-value>
>      </context-param>-->
> 
>      <context-param>
>      	<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
>      	<param-value>.jsp</param-value>
>      </context-param>
> 
>      <context-param>
>      	<param-name>facelets.VIEW_MAPPINGS</param-name>
>      	<param-value>*.xhtml</param-value>
>      </context-param>
> 
>      <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-mapping>
>          <servlet-name>Faces Servlet</servlet-name>
>          <url-pattern>/faces/*</url-pattern>
>      </servlet-mapping>
> 	
> 	<welcome-file-list>
> 		
> 		<welcome-file>pages/public/index.jsp</welcome-file>
> 	</welcome-file-list>
> --------------------------------
> 
> /pages/public/ contains index.xhtml, index.jsp, and index.faces. For 
> some reason, index.faces is being served to the client.
> 
> Any ideas?
> 
> Regards,
> 
> Jeff Bischoff
> Kenneth L Kurz & Associates, Inc.
> 
> Romanowski, Tim wrote:
>> Not sure if this fits your needs, but I've accomplished this by using a
>> dummy jsp page that redirects to my 'real' index.xhtml file.  Index.jsp as
>> well as index.xhtml are in my root web directory.
>>
>>     <welcome-file-list>
>>         <welcome-file>
>>             index.jsp
>>         </welcome-file>
>>     </welcome-file-list>
>>
>>
>> Tim
>>
>>
>> -----Original Message-----
>> From: Jeff Bischoff [mailto:jbischoff@klkurz.com] 
>> Sent: Friday, February 02, 2007 1:02 PM
>> To: MyFaces Discussion
>> Subject: /faces/* servlet mapping and welcome files
>>
>> Hey guys, quick question:
>>
>> Does anyone have welcome files working successfully with the /faces/* 
>> servlet mapping? I previously used a *.faces extension mapping, and had 
>> welcome files working with a dummy index.faces file. But now I am 
>> converting to facelets and followed the advice from the archives to get 
>> them to coexist [1]. Now that I'm using /faces/* I have both facelets 
>> and JSP working just fine together except my welcome-file doesn't work 
>> (results in a blank page shown). I've tried different paths combinations 
>> in the welcome-file-list, with no luck so far. Latest entry is pasted 
>> below. Thanks for any tips!
>>
>> <welcome-file-list>
>>     <!-- OLD <welcome-file>pages/public/index.faces</welcome-file>-->
>>     <welcome-file>faces/pages/public/index.xhtml</welcome-file>
>> </welcome-file-list>
>>
>> [1] http://www.nabble.com/Facelets-tf2005321.html#a5509212
>>
>> Regards,
>>
>> Jeff Bischoff
>> Kenneth L Kurz & Associates, Inc.
>>
>>
> 
> 



RE: /faces/* servlet mapping and welcome files

Posted by "Romanowski, Tim" <ti...@lmco.com>.
Interesting...my redirect is this:
<jsp:forward page="/faces/index2.xhtml"/>

Admittedly, I'm not an expert on the mappings and how the values in web.xml
are supposed to be handled.  But this does work for me on various builds of
Glassfish V2.  

However, I did note this, which may explain why mine is working:
    <!-- Use prefix-mapping instead of suffix-mapping.
         This allows us to support both *.xhtml and *.jsp files -->
    <context-param>
        <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
        <param-value>/faces/*</param-value>
    </context-param>

Now that I think about it, I wonder -- despite working, is this a bad
approach?

Tim

-----Original Message-----
From: Jeff Bischoff [mailto:jbischoff@klkurz.com] 
Sent: Friday, February 02, 2007 2:48 PM
To: MyFaces Discussion
Subject: Re: /faces/* servlet mapping and welcome files

What do you redirect to? /faces/myfile.xhtml?

Actually I can't get this working either. I've discovered that "blank 
page" coming up is actually my index.faces dummy file! When I view the 
source, I see the comment I wrote in there.

So why would it be going there when I commented out the extension 
mapping? Does JBoss treats commented-out items in web.xml as if they are 
not commented?

Some relevent parts of web.xml:
--------------------------------
<!-- Use Documents Saved as *.xhtml
     <context-param>
     	<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
     	<param-value>.xhtml</param-value>
     </context-param>-->

     <context-param>
     	<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
     	<param-value>.jsp</param-value>
     </context-param>

     <context-param>
     	<param-name>facelets.VIEW_MAPPINGS</param-name>
     	<param-value>*.xhtml</param-value>
     </context-param>

     <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-mapping>
         <servlet-name>Faces Servlet</servlet-name>
         <url-pattern>/faces/*</url-pattern>
     </servlet-mapping>
	
	<welcome-file-list>
		
		<welcome-file>pages/public/index.jsp</welcome-file>
	</welcome-file-list>
--------------------------------

/pages/public/ contains index.xhtml, index.jsp, and index.faces. For 
some reason, index.faces is being served to the client.

Any ideas?

Regards,

Jeff Bischoff
Kenneth L Kurz & Associates, Inc.

Romanowski, Tim wrote:
> Not sure if this fits your needs, but I've accomplished this by using a
> dummy jsp page that redirects to my 'real' index.xhtml file.  Index.jsp as
> well as index.xhtml are in my root web directory.
> 
>     <welcome-file-list>
>         <welcome-file>
>             index.jsp
>         </welcome-file>
>     </welcome-file-list>
> 
> 
> Tim
> 
> 
> -----Original Message-----
> From: Jeff Bischoff [mailto:jbischoff@klkurz.com] 
> Sent: Friday, February 02, 2007 1:02 PM
> To: MyFaces Discussion
> Subject: /faces/* servlet mapping and welcome files
> 
> Hey guys, quick question:
> 
> Does anyone have welcome files working successfully with the /faces/* 
> servlet mapping? I previously used a *.faces extension mapping, and had 
> welcome files working with a dummy index.faces file. But now I am 
> converting to facelets and followed the advice from the archives to get 
> them to coexist [1]. Now that I'm using /faces/* I have both facelets 
> and JSP working just fine together except my welcome-file doesn't work 
> (results in a blank page shown). I've tried different paths combinations 
> in the welcome-file-list, with no luck so far. Latest entry is pasted 
> below. Thanks for any tips!
> 
> <welcome-file-list>
>     <!-- OLD <welcome-file>pages/public/index.faces</welcome-file>-->
>     <welcome-file>faces/pages/public/index.xhtml</welcome-file>
> </welcome-file-list>
> 
> [1] http://www.nabble.com/Facelets-tf2005321.html#a5509212
> 
> Regards,
> 
> Jeff Bischoff
> Kenneth L Kurz & Associates, Inc.
> 
> 



Re: /faces/* servlet mapping and welcome files

Posted by Mick Knutson <mi...@gmail.com>.
Did you try to reference /faces/myfile.jsp as I think the facelets filter
will convert the reference to the correct xhtml file



On 2/2/07, Jeff Bischoff <jb...@klkurz.com> wrote:
>
> What do you redirect to? /faces/myfile.xhtml?
>
> Actually I can't get this working either. I've discovered that "blank
> page" coming up is actually my index.faces dummy file! When I view the
> source, I see the comment I wrote in there.
>
> So why would it be going there when I commented out the extension
> mapping? Does JBoss treats commented-out items in web.xml as if they are
> not commented?
>
> Some relevent parts of web.xml:
> --------------------------------
> <!-- Use Documents Saved as *.xhtml
>      <context-param>
>         <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
>         <param-value>.xhtml</param-value>
>      </context-param>-->
>
>      <context-param>
>         <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
>         <param-value>.jsp</param-value>
>      </context-param>
>
>      <context-param>
>         <param-name>facelets.VIEW_MAPPINGS</param-name>
>         <param-value>*.xhtml</param-value>
>      </context-param>
>
>      <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-mapping>
>          <servlet-name>Faces Servlet</servlet-name>
>          <url-pattern>/faces/*</url-pattern>
>      </servlet-mapping>
>
>         <welcome-file-list>
>
>                 <welcome-file>pages/public/index.jsp</welcome-file>
>         </welcome-file-list>
> --------------------------------
>
> /pages/public/ contains index.xhtml, index.jsp, and index.faces. For
> some reason, index.faces is being served to the client.
>
> Any ideas?
>
> Regards,
>
> Jeff Bischoff
> Kenneth L Kurz & Associates, Inc.
>
> Romanowski, Tim wrote:
> > Not sure if this fits your needs, but I've accomplished this by using a
> > dummy jsp page that redirects to my 'real' index.xhtml file.  Index.jspas
> > well as index.xhtml are in my root web directory.
> >
> >     <welcome-file-list>
> >         <welcome-file>
> >             index.jsp
> >         </welcome-file>
> >     </welcome-file-list>
> >
> >
> > Tim
> >
> >
> > -----Original Message-----
> > From: Jeff Bischoff [mailto:jbischoff@klkurz.com]
> > Sent: Friday, February 02, 2007 1:02 PM
> > To: MyFaces Discussion
> > Subject: /faces/* servlet mapping and welcome files
> >
> > Hey guys, quick question:
> >
> > Does anyone have welcome files working successfully with the /faces/*
> > servlet mapping? I previously used a *.faces extension mapping, and had
> > welcome files working with a dummy index.faces file. But now I am
> > converting to facelets and followed the advice from the archives to get
> > them to coexist [1]. Now that I'm using /faces/* I have both facelets
> > and JSP working just fine together except my welcome-file doesn't work
> > (results in a blank page shown). I've tried different paths combinations
> > in the welcome-file-list, with no luck so far. Latest entry is pasted
> > below. Thanks for any tips!
> >
> > <welcome-file-list>
> >     <!-- OLD <welcome-file>pages/public/index.faces</welcome-file>-->
> >     <welcome-file>faces/pages/public/index.xhtml</welcome-file>
> > </welcome-file-list>
> >
> > [1] http://www.nabble.com/Facelets-tf2005321.html#a5509212
> >
> > Regards,
> >
> > Jeff Bischoff
> > Kenneth L Kurz & Associates, Inc.
> >
> >
>
>
>


-- 
---
Thanks,
Mick Knutson

http://www.baselogic.com
http://www.blincmagazine.com
http://www.djmick.com
http://www.myspace.com/djmick_dot_com
http://www.thumpradio.com
---

Re: /faces/* servlet mapping and welcome files

Posted by Jeff Bischoff <jb...@klkurz.com>.
What do you redirect to? /faces/myfile.xhtml?

Actually I can't get this working either. I've discovered that "blank 
page" coming up is actually my index.faces dummy file! When I view the 
source, I see the comment I wrote in there.

So why would it be going there when I commented out the extension 
mapping? Does JBoss treats commented-out items in web.xml as if they are 
not commented?

Some relevent parts of web.xml:
--------------------------------
<!-- Use Documents Saved as *.xhtml
     <context-param>
     	<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
     	<param-value>.xhtml</param-value>
     </context-param>-->

     <context-param>
     	<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
     	<param-value>.jsp</param-value>
     </context-param>

     <context-param>
     	<param-name>facelets.VIEW_MAPPINGS</param-name>
     	<param-value>*.xhtml</param-value>
     </context-param>

     <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-mapping>
         <servlet-name>Faces Servlet</servlet-name>
         <url-pattern>/faces/*</url-pattern>
     </servlet-mapping>
	
	<welcome-file-list>
		
		<welcome-file>pages/public/index.jsp</welcome-file>
	</welcome-file-list>
--------------------------------

/pages/public/ contains index.xhtml, index.jsp, and index.faces. For 
some reason, index.faces is being served to the client.

Any ideas?

Regards,

Jeff Bischoff
Kenneth L Kurz & Associates, Inc.

Romanowski, Tim wrote:
> Not sure if this fits your needs, but I've accomplished this by using a
> dummy jsp page that redirects to my 'real' index.xhtml file.  Index.jsp as
> well as index.xhtml are in my root web directory.
> 
>     <welcome-file-list>
>         <welcome-file>
>             index.jsp
>         </welcome-file>
>     </welcome-file-list>
> 
> 
> Tim
> 
> 
> -----Original Message-----
> From: Jeff Bischoff [mailto:jbischoff@klkurz.com] 
> Sent: Friday, February 02, 2007 1:02 PM
> To: MyFaces Discussion
> Subject: /faces/* servlet mapping and welcome files
> 
> Hey guys, quick question:
> 
> Does anyone have welcome files working successfully with the /faces/* 
> servlet mapping? I previously used a *.faces extension mapping, and had 
> welcome files working with a dummy index.faces file. But now I am 
> converting to facelets and followed the advice from the archives to get 
> them to coexist [1]. Now that I'm using /faces/* I have both facelets 
> and JSP working just fine together except my welcome-file doesn't work 
> (results in a blank page shown). I've tried different paths combinations 
> in the welcome-file-list, with no luck so far. Latest entry is pasted 
> below. Thanks for any tips!
> 
> <welcome-file-list>
>     <!-- OLD <welcome-file>pages/public/index.faces</welcome-file>-->
>     <welcome-file>faces/pages/public/index.xhtml</welcome-file>
> </welcome-file-list>
> 
> [1] http://www.nabble.com/Facelets-tf2005321.html#a5509212
> 
> Regards,
> 
> Jeff Bischoff
> Kenneth L Kurz & Associates, Inc.
> 
> 



RE: /faces/* servlet mapping and welcome files

Posted by "Romanowski, Tim" <ti...@lmco.com>.
Not sure if this fits your needs, but I've accomplished this by using a
dummy jsp page that redirects to my 'real' index.xhtml file.  Index.jsp as
well as index.xhtml are in my root web directory.

    <welcome-file-list>
        <welcome-file>
            index.jsp
        </welcome-file>
    </welcome-file-list>


Tim


-----Original Message-----
From: Jeff Bischoff [mailto:jbischoff@klkurz.com] 
Sent: Friday, February 02, 2007 1:02 PM
To: MyFaces Discussion
Subject: /faces/* servlet mapping and welcome files

Hey guys, quick question:

Does anyone have welcome files working successfully with the /faces/* 
servlet mapping? I previously used a *.faces extension mapping, and had 
welcome files working with a dummy index.faces file. But now I am 
converting to facelets and followed the advice from the archives to get 
them to coexist [1]. Now that I'm using /faces/* I have both facelets 
and JSP working just fine together except my welcome-file doesn't work 
(results in a blank page shown). I've tried different paths combinations 
in the welcome-file-list, with no luck so far. Latest entry is pasted 
below. Thanks for any tips!

<welcome-file-list>
    <!-- OLD <welcome-file>pages/public/index.faces</welcome-file>-->
    <welcome-file>faces/pages/public/index.xhtml</welcome-file>
</welcome-file-list>

[1] http://www.nabble.com/Facelets-tf2005321.html#a5509212

Regards,

Jeff Bischoff
Kenneth L Kurz & Associates, Inc.



Re: /faces/* servlet mapping and welcome files

Posted by Mike Kienenberger <mk...@gmail.com>.
Hey Jeff,

The topic of JSF welcome files has been covered extensively on the
facelets users list in the past.  It'd be great if someone would
doument this either in the facelets wiki or the myfaces wiki.

This link provides a number of ways to do it.

http://www.nabble.com/forum/ViewPost.jtp?post=3210994&framed=y

I use prefix mapping and a javascript redirect, but when I get a
chance to revisit it, I'll probably switch over to creating a
placeholder file and using a facelets entry in the welcome-file
section.

index.html:
============
<html>
    <head>
        <script language="javascript">
            location = "./faces/pages/yourStartPage.xhtml";
        </script>
    </head>
    <body>
        ...starting...
    </body>
</html>
============



On 2/7/07, Jeff Bischoff <jb...@klkurz.com> wrote:
> Gah, I got frustrated with this attempt. I've been using extensions
> mapping successfully for about a year, and I'm comfortable with that, so
> I've switched back to it. That will simply mean that I have to hurry up
> and convert the rest of the application to facelets to make it all work
> again. :)
>
> Thanks all for the tips!
>
> Jeff Bischoff
> Kenneth L Kurz & Associates, Inc.
>
> Giampaolo Tomassoni wrote:
> > From: Jeff Bischoff [mailto:jbischoff@klkurz.com]
> >> Hey guys, quick question:
> >>
> >> Does anyone have welcome files working successfully with the /faces/*
> >> servlet mapping? I previously used a *.faces extension mapping, and had
> >> welcome files working with a dummy index.faces file. But now I am
> >> converting to facelets and followed the advice from the archives to get
> >> them to coexist [1]. Now that I'm using /faces/* I have both facelets
> >> and JSP working just fine together except my welcome-file doesn't work
> >> (results in a blank page shown). I've tried different paths combinations
> >> in the welcome-file-list, with no luck so far. Latest entry is pasted
> >> below. Thanks for any tips!
> >>
> >> <welcome-file-list>
> >>     <!-- OLD <welcome-file>pages/public/index.faces</welcome-file>-->
> >>     <welcome-file>faces/pages/public/index.xhtml</welcome-file>
> >> </welcome-file-list>
> >>
> >> [1] http://www.nabble.com/Facelets-tf2005321.html#a5509212
> >>
> >> Regards,
> >
> > Hi Jeff,
> >
> > I did never manage to have this working with facelets.
> >
> > It is probably a facelets issue. The only solution I see is to do an http filter in order to detect directory requests and redirect them to the wanted resource.
> >
> > Please note that if you use apache + mod_jk 1.1.20 and attempt to fix this through the DirectoryIndex directive in Apache, it will not work either: I did place a bug for this in the apache buglist (http://issues.apache.org/bugzilla/show_bug.cgi?id=41430).
> >
> > Cheers,
> >
> > Giampaolo
> >
> >
> >> Jeff Bischoff
> >> Kenneth L Kurz & Associates, Inc.
> >>
> >>
> >
> >
> >
> >
>
>
>

Re: /faces/* servlet mapping and welcome files

Posted by Jeff Bischoff <jb...@klkurz.com>.
Gah, I got frustrated with this attempt. I've been using extensions 
mapping successfully for about a year, and I'm comfortable with that, so 
I've switched back to it. That will simply mean that I have to hurry up 
and convert the rest of the application to facelets to make it all work 
again. :)

Thanks all for the tips!

Jeff Bischoff
Kenneth L Kurz & Associates, Inc.

Giampaolo Tomassoni wrote:
> From: Jeff Bischoff [mailto:jbischoff@klkurz.com]
>> Hey guys, quick question:
>>
>> Does anyone have welcome files working successfully with the /faces/* 
>> servlet mapping? I previously used a *.faces extension mapping, and had 
>> welcome files working with a dummy index.faces file. But now I am 
>> converting to facelets and followed the advice from the archives to get 
>> them to coexist [1]. Now that I'm using /faces/* I have both facelets 
>> and JSP working just fine together except my welcome-file doesn't work 
>> (results in a blank page shown). I've tried different paths combinations 
>> in the welcome-file-list, with no luck so far. Latest entry is pasted 
>> below. Thanks for any tips!
>>
>> <welcome-file-list>
>>     <!-- OLD <welcome-file>pages/public/index.faces</welcome-file>-->
>>     <welcome-file>faces/pages/public/index.xhtml</welcome-file>
>> </welcome-file-list>
>>
>> [1] http://www.nabble.com/Facelets-tf2005321.html#a5509212
>>
>> Regards,
> 
> Hi Jeff,
> 
> I did never manage to have this working with facelets.
> 
> It is probably a facelets issue. The only solution I see is to do an http filter in order to detect directory requests and redirect them to the wanted resource.
> 
> Please note that if you use apache + mod_jk 1.1.20 and attempt to fix this through the DirectoryIndex directive in Apache, it will not work either: I did place a bug for this in the apache buglist (http://issues.apache.org/bugzilla/show_bug.cgi?id=41430).
> 
> Cheers,
> 
> Giampaolo
> 
> 
>> Jeff Bischoff
>> Kenneth L Kurz & Associates, Inc.
>>
>>
> 
> 
> 
> 



RE: /faces/* servlet mapping and welcome files

Posted by Giampaolo Tomassoni <g....@libero.it>.
From: Jeff Bischoff [mailto:jbischoff@klkurz.com]
> 
> Hey guys, quick question:
> 
> Does anyone have welcome files working successfully with the /faces/* 
> servlet mapping? I previously used a *.faces extension mapping, and had 
> welcome files working with a dummy index.faces file. But now I am 
> converting to facelets and followed the advice from the archives to get 
> them to coexist [1]. Now that I'm using /faces/* I have both facelets 
> and JSP working just fine together except my welcome-file doesn't work 
> (results in a blank page shown). I've tried different paths combinations 
> in the welcome-file-list, with no luck so far. Latest entry is pasted 
> below. Thanks for any tips!
> 
> <welcome-file-list>
>     <!-- OLD <welcome-file>pages/public/index.faces</welcome-file>-->
>     <welcome-file>faces/pages/public/index.xhtml</welcome-file>
> </welcome-file-list>
> 
> [1] http://www.nabble.com/Facelets-tf2005321.html#a5509212
> 
> Regards,

Hi Jeff,

I did never manage to have this working with facelets.

It is probably a facelets issue. The only solution I see is to do an http filter in order to detect directory requests and redirect them to the wanted resource.

Please note that if you use apache + mod_jk 1.1.20 and attempt to fix this through the DirectoryIndex directive in Apache, it will not work either: I did place a bug for this in the apache buglist (http://issues.apache.org/bugzilla/show_bug.cgi?id=41430).

Cheers,

Giampaolo


> 
> Jeff Bischoff
> Kenneth L Kurz & Associates, Inc.
> 
>