You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by de...@xsoftware.biz on 2006/03/17 19:48:11 UTC

DEFAULT_SUFFIX question again

so it turns out I can't use *.jsf as the file extension if I am already
using for the filter stuff to go to Faces Servlet.  What is bizarre though
is when I start using *.faces as my filter and *.jsf as my file extension,
MyFaces sends back <jsp:root and stuff to the browser instead of changing
everything to html.  It does not seem to be processing the *.jsf(JSF jsp)
file.  Any one know why?
thanks,
dean


Re: DEFAULT_SUFFIX question again

Posted by Laurie Harper <la...@holoweb.net>.
dean@xsoftware.biz wrote:
> so it turns out I can't use *.jsf as the file extension if I am already
> using for the filter stuff to go to Faces Servlet.  What is bizarre though
> is when I start using *.faces as my filter and *.jsf as my file extension,
> MyFaces sends back <jsp:root and stuff to the browser instead of changing
> everything to html.  It does not seem to be processing the *.jsf(JSF jsp)
> file.  Any one know why?

Yes, you would need to tell your servlet container to process *.jsf 
files as JSPs. It has no way of knowing what a .jsf file is unless you 
tell it. How you do that would probably depend on what servlet container 
you're using. For Tomcat, you would do it be specifying a servlet 
mapping for *.jsf in your web.xml.

L.


Re: multiple DEFAULT_SUFFIX's????

Posted by Dean Hiller <de...@xsoftware.biz>.
interesting.  that should be fun to play with.
thanks,
dean

Andrew Robinson wrote:

>This has been brought up before. I believe the answer is 'no, but
>yes'. Out of the box, there is nothing in the specification to do
>this. But on the other hand, all the control (I believe) lies in the
>view handler. So if you create your own view handler, you can perform
>all the extension mapping yourself and even ignore DEFAULT_SUFFIX if
>you want.
>
>-Andrew
>
>On 3/17/06, dean@xsoftware.biz <de...@xsoftware.biz> wrote:
>  
>
>>I have one file that has to be a JSF jsp file.  It cannot be a jspx file.
>>I then have other files that I really want to be jspx files, but it seems
>>I can't have both.  There is only one DEFAULT_SUFFIX.  Is there a way to
>>specify multiple mappings such that .xfaces -> .jspx  .faces -> .jsp
>>thanks,
>>dean
>>
>>
>>    
>>
>
>  
>


Re: multiple DEFAULT_SUFFIX's????

Posted by Andrew Robinson <an...@gmail.com>.
This has been brought up before. I believe the answer is 'no, but
yes'. Out of the box, there is nothing in the specification to do
this. But on the other hand, all the control (I believe) lies in the
view handler. So if you create your own view handler, you can perform
all the extension mapping yourself and even ignore DEFAULT_SUFFIX if
you want.

-Andrew

On 3/17/06, dean@xsoftware.biz <de...@xsoftware.biz> wrote:
> I have one file that has to be a JSF jsp file.  It cannot be a jspx file.
> I then have other files that I really want to be jspx files, but it seems
> I can't have both.  There is only one DEFAULT_SUFFIX.  Is there a way to
> specify multiple mappings such that .xfaces -> .jspx  .faces -> .jsp
> thanks,
> dean
>
>

multiple DEFAULT_SUFFIX's????

Posted by de...@xsoftware.biz.
I have one file that has to be a JSF jsp file.  It cannot be a jspx file. 
I then have other files that I really want to be jspx files, but it seems
I can't have both.  There is only one DEFAULT_SUFFIX.  Is there a way to
specify multiple mappings such that .xfaces -> .jspx  .faces -> .jsp
thanks,
dean


Re: DEFAULT_SUFFIX question again

Posted by de...@xsoftware.biz.
actually yes, I am now set up with a jspx extension and jsf to servlet
mapping.  I just thought faces to jsf was a little more clear.  From what
I understand jspx is just an xml jsp file, not necessarily a jsf jsp file
so I thought *.jsf would be much more clear.  This is just from my
experiences as a newb and figuring this stuff out.
thanks,
dean

> No, but why not use .jspx as your file extension?  Perhaps the
> container only knows how to compile the jsp files properly if you're
> using that naming scheme.
>
> I don't use JSP, so this is all speculation.  I did successfully use
> jspx files for a short time a year ago before I moved on to facelets,
> so I know they work.   I'm fairly sure I used a jsf DEFAULT_SUFFIX at
> the time with a jspx file extension.
>
>
> On 3/17/06, dean@xsoftware.biz <de...@xsoftware.biz> wrote:
>> so it turns out I can't use *.jsf as the file extension if I am already
>> using for the filter stuff to go to Faces Servlet.  What is bizarre
>> though
>> is when I start using *.faces as my filter and *.jsf as my file
>> extension,
>> MyFaces sends back <jsp:root and stuff to the browser instead of
>> changing
>> everything to html.  It does not seem to be processing the *.jsf(JSF
>> jsp)
>> file.  Any one know why?
>> thanks,
>> dean
>>
>>
>
>



Re: DEFAULT_SUFFIX question again

Posted by Mike Kienenberger <mk...@gmail.com>.
No, but why not use .jspx as your file extension?  Perhaps the
container only knows how to compile the jsp files properly if you're
using that naming scheme.

I don't use JSP, so this is all speculation.  I did successfully use
jspx files for a short time a year ago before I moved on to facelets,
so I know they work.   I'm fairly sure I used a jsf DEFAULT_SUFFIX at
the time with a jspx file extension.


On 3/17/06, dean@xsoftware.biz <de...@xsoftware.biz> wrote:
> so it turns out I can't use *.jsf as the file extension if I am already
> using for the filter stuff to go to Faces Servlet.  What is bizarre though
> is when I start using *.faces as my filter and *.jsf as my file extension,
> MyFaces sends back <jsp:root and stuff to the browser instead of changing
> everything to html.  It does not seem to be processing the *.jsf(JSF jsp)
> file.  Any one know why?
> thanks,
> dean
>
>