This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes JSF and the fly likes XHTML in JSF1.2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » JSF
Bookmark "XHTML in JSF1.2" Watch "XHTML in JSF1.2" New topic
Author

XHTML in JSF1.2

Jayakrishnan.C Chandramohan
Greenhorn

Joined: Aug 08, 2012
Posts: 11
Hi please help me. am new to java, can you please help me how to create welcome page in xhtml in jsf1.2.
i created, but when i wish to run the page it asks to save a file with unknown format
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16101
    
  21

Welcome to the JavaRanch, Jayakrishnan!

There's a little bit of confusion with "xhtml". Traditionally, xhtml is strict-form XML HTML as defined by the W3C. However, a View Definition Language - also known as View Template Language - was created as part of the Facelets project, and the VDL files are also in XML format and carry the ".xhtml" file extension, even though they are not, strictly speaking XHTML.

If you want to output XHTML, that's just a matter of coding your view template properly. To the best of my knowledge, JSF's HTML renderers all create HTML that conforms to the XHTML standard.

On the other hand, if what you really want is to define views using VDL, your webapp must include the facelets jar available from the Facelets project, and you must configure Facelets in your web.xml.

Facelets has proven to be very useful. So useful, in fact, that VTL is the standard for defining Views in JSF2, Facelets support is built in to the JSF2 standard, and JSP Views are deprecated.


Customer surveys are for companies who didn't pay proper attention to begin with.
Brendan Healey
Ranch Hand

Joined: May 12, 2009
Posts: 218

In fact, if you're just getting started do you have a pressing reason for using JSF 1.2 such as an employer
requirement? If not it would save you a fair amount of messing about by just using JSF 2. Another benefit
is that you can use a Java EE 6 server.

Regards,
Brendan.
 
GeeCON Prague 2014
 
subject: XHTML in JSF1.2