Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: JSF? not rendering.

  1. #1
    Forum Squatter newbie's Avatar
    Join Date
    Nov 2010
    Location
    North Wales
    Posts
    661
    My Mood
    Stressed
    Thanks
    28
    Thanked 115 Times in 106 Posts
    Blog Entries
    1

    Default JSF? not rendering.

    Here's the deal, I've got a login page made from a facelet (xhtml) and each time I run my JSF project, It simply returns a blank page.
    If I go to view source, the code is exactly the same as I wrote it, with all jsf tags still there.

    Part of web.xml
        <welcome-file-list>
            <welcome-file>faces/myLoginPage.xhtml</welcome-file>
        </welcome-file-list>


    myLoginPage.xhtml header
    <?xml version='1.0' encoding='UTF-8' ?> 
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"
          xmlns:h="http://java.sun.com/jsf/html">

    Anybody got any idea as to what might be happening?

    Note: If I make the file a .JSP it works, but my preference is to use XHTML, so I'd only like to go with that approach as last alternative
    Please use [highlight=Java]//code goes here...[/highlight] tags when posting your code


  2. #2
    Forum Squatter newbie's Avatar
    Join Date
    Nov 2010
    Location
    North Wales
    Posts
    661
    My Mood
    Stressed
    Thanks
    28
    Thanked 115 Times in 106 Posts
    Blog Entries
    1

    Default Re: JSF? not rendering.

    Never mind, Solved issue.
    Hours of my life gone because faces-config was set to V1.2 instead of 2.0.

    If anyone ever has same issue, change:
    <faces-config version="1.2" 
        xmlns="http://java.sun.com/xml/ns/javaee" 
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">

    to

    <faces-config
        xmlns="http://java.sun.com/xml/ns/javaee"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
        version="2.0">
    Please use [highlight=Java]//code goes here...[/highlight] tags when posting your code

  3. The Following User Says Thank You to newbie For This Useful Post:

    copeg (March 21st, 2011)

  4. #3
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,320
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: JSF? not rendering.

    Glad you got it solved, and thanks for posting back your solution.

Similar Threads

  1. Metal LAF JScrollPane rendering bug?
    By tpsuk in forum AWT / Java Swing
    Replies: 3
    Last Post: February 8th, 2011, 12:22 PM
  2. Problems with rendering a jprogressbar
    By albertof in forum What's Wrong With My Code?
    Replies: 1
    Last Post: November 10th, 2010, 04:47 AM
  3. JMonkeyEngine 3 not rendering.
    By scribbleno1 in forum What's Wrong With My Code?
    Replies: 1
    Last Post: May 13th, 2010, 02:29 AM
  4. Problem in JSP rendering
    By srkumarj2ee@gmail.com in forum JavaServer Pages: JSP & JSTL
    Replies: 1
    Last Post: September 13th, 2009, 02:26 PM