Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Is this a facelets?

 
Ziyang Zhang
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am currently working on a JSF project. And there are some xhtml files in the project.
They start with


Are they facelets? Why there is no xmlns:ui="http://java.sun.com/jsf/facelets included???
Quite new in JSF.
Thanks a lot.
 
Vadym Baranenko
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And what is the extension of your file? *.xhtml or *.jsf? may by it's fist plain jsf?
 
Ziyang Zhang
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vadim Baranenko wrote:And what is the extension of your file? *.xhtml or *.jsf? may by it's fist plain jsf?

The extention is .xhtml. When you see it in browser, it will be .jsf.

My guess is JSF2.0 is used in this project. And in JSF2.0, Facelets is the default view, so it is not necessary to include xmlns:ui="http://java.sun.com/jsf/facelets.

Still not sure...

Could somebody help me?
 
Abdullah Dokuyucu
Greenhorn
Posts: 24
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Basic facelet (.xhtml), not sure if you can omit anything from that.
 
Ziyang Zhang
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Abdullah Dokuyucu wrote:

Basic facelet (.xhtml), not sure if you can omit anything from that.


Thank you very much for your answer.
I think the following lines should be included at least.
# xmlns:f="http://java.sun.com/jsf/core"
# xmlns:h="http://java.sun.com/jsf/html"
 
Abdullah Dokuyucu
Greenhorn
Posts: 24
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, xmlns:f="http://java.sun.com/jsf/core" is optional.
 
Abdullah Dokuyucu
Greenhorn
Posts: 24
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And actually, xmlns:ui="http://java.sun.com/jsf/facelets" is optional too.
 
Ziyang Zhang
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Abdullah Dokuyucu wrote:And actually, xmlns:ui="http://java.sun.com/jsf/facelets" is optional too.

Thanks a lot!!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic