This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
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


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Myfaces - preferred page language (JSP- facelets)" Watch "Myfaces - preferred page language (JSP- facelets)" New topic
Author

Myfaces - preferred page language (JSP- facelets)

Men rai
Greenhorn

Joined: May 31, 2011
Posts: 11
Hi,
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:

<welcome-file-list>
<welcome-file>div.jsf</welcome-file>
</welcome-file-list>

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:

libs.MyFaces.classpath=\
${base}/MyFaces/batik-awt-util-1.6-1.jar;\
${base}/MyFaces/batik-ext-1.6-1.jar;\
${base}/MyFaces/batik-gui-util-1.6-1.jar;\
${base}/MyFaces/batik-util-1.6-1.jar;\
${base}/MyFaces/commons-beanutils-1.8.3.jar;\
${base}/MyFaces/commons-codec-1.3.jar;\
${base}/MyFaces/commons-collections-3.2.1.jar;\
${base}/MyFaces/commons-digester-1.8.jar;\
${base}/MyFaces/commons-discovery-0.4.jar;\
${base}/MyFaces/commons-fileupload-1.2.1.jar;\
${base}/MyFaces/commons-io-1.3.2.jar;\
${base}/MyFaces/commons-lang-2.4.jar;\
${base}/MyFaces/commons-logging-1.1.1.jar;\
${base}/MyFaces/commons-validator-1.3.1.jar;\
${base}/MyFaces/jstl-1.2.jar;\
${base}/MyFaces/log4j-1.2.13.jar;\
${base}/MyFaces/myfaces-api-2.0.2.jar;\
${base}/MyFaces/myfaces-impl-2.0.2.jar;\
${base}/MyFaces/oro-2.0.8.jar;\
${base}/MyFaces/standard-1.1.2.jar;\
${base}/MyFaces/tomahawk20-1.1.10.jar;\
${base}/MyFaces/xml-apis-1.0.b2.jar;\
${base}/MyFaces/xmlParserAPIs-2.0.2.jar

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)