• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Myfaces - preferred page language (JSP- facelets)

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 200
Eclipse IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
.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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic