facebook

No output on simple JSF application

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #393950 Reply

    Mork
    Participant

    I created a simple JSF application in MyE with an index.xhtml that looks like this:

    <?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://xmlns.jcp.org/jsf/html"
          xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
          xmlns:f="http://xmlns.jcp.org/jsf/core">
       <f:view>
          <h:outputLabel value="Hello, world"/>
       </f:view>
    </html>

    —-

    Yet, when I Run As…MyEclipse Server Application, I get a blank screen. I can manually add text outside the tags and it will appear, but JSF doesn’t seem to be interpreting the output tags.

    I was able to get your more involved tutorial working so this “issue” may be something I’m doing wrong.

    See attached image.

    Any suggestions would be welcome.

    Thanks,

    – m

    P.S. I also tried changing the compiler version to 1.7.

    Attachments:
    You must be logged in to view attached files.
    #393998 Reply

    support-swapna
    Moderator

    Jim,

    What is the address you are using in the address bar to activate the application ? For example if the page is index.xhtml, then you should use index.faces in the address bar if you have mapped the FacesServlet to the *.faces extension. Check the web.xml for the same.

    For help on JSF development, I suggest you go through tutorials available on the web and post to development forums for better support.

    Let us know how it works for you.

    –Swapna
    MyEclipse Support

    #394001 Reply

    Mork
    Participant

    Yes, that worked.

    Sorry about that….I am actually working through multiple tutorials. Some of them, in the simple examples, map the FacesServlet to the *.faces extension and others don’t.

    In one tutorial, it’s defined like this:

        <servlet-mapping>
            <servlet-name>Faces Servlet</servlet-name>
            <url-pattern>*.xhtml</url-pattern>
        </servlet-mapping>

    In MyEclipse, it’s more the expected, like this:

    ` <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.faces</url-pattern>
    </servlet-mapping>`

    In any case, I’m just getting back to JSF and just got a bit confused by the results and didn’t think it was a mapping issue.

    Appreciate your terrific support!!! 🙂

    – m

    #394110 Reply

    support-swapna
    Moderator

    Jim,

    Glad that it works. Good luck with your learning 🙂

    Let us know if you see any issues.

    –Swapna
    MyEclipse Support

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: No output on simple JSF application

This topic is marked as closed to new replies, however your posting capabilities still allow you to do so.

You must be logged in to post in the forum log in