jQuery in Action, 3rd edition
The moose likes JSF and the fly likes Myfaces - preferred page language (JSP- facelets) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Myfaces - preferred page language (JSP- facelets)" Watch "Myfaces - preferred page language (JSP- facelets)" New topic

Myfaces - preferred page language (JSP- facelets)

Men rai

Joined: May 31, 2011
Posts: 11
I want to build an application using MyFaces.
I downloaded the file tomahawk-examples-1.1.10-bin and I imported the sample myfaces-example-simple20-1.1.10 into netbeans.
My problem is that when I run it, it says that the file div.jsp is no available. My web.xml is as follows:


Thats because in the download menu at project properties - framework - Javaserver Faces - configuration - preferred page language appears JSP. I try to change it to facelets But when I save it stores JSP, when I enter again always appear JSP.

The libraries I'm using are the next ones:


I supose that If I could change the preferred page language to facelets it would work but I don not how.
Does anybody knows how can I do it? I want that when I request an *.jsf page it renders the xhtml page.
Thanks in advance
Guy deLyonesse
Ranch Hand

Joined: Apr 12, 2011
Posts: 200

.jsf isn't used as a file extension.

You should have this in your web.xml file:

This lets the servlet know what extension you're using by default in your app. You also need to map the servlet to the URL pattern.

When the request is submitted in these URL formats, it informs the servlet to treat it as a JSF request and proceeds accordingly.
I agree. Here's the link: http://aspose.com/file-tools
subject: Myfaces - preferred page language (JSP- facelets)
It's not a secret anymore!