Creating JSF 2 Hello World Application in Eclipse

The following two tabs change content below.
Prasad Kharkar is a java enthusiast and always keen to explore and learn java technologies. He is SCJP,OCPWCD, OCEJPAD and aspires to be java architect.

Latest posts by Prasad Kharkar (see all)

Hello all, in this tutorial we are going to learn to create a Hello world jsf 2 application in eclipse.

Tools used: eclipse juno, tomcat 7 server.

1. In eclipse IDE, go to File -> New -> Dynamic web project

New Dynamic Web Project
New Dynamic Web Project

2. Click on New Runtime button next to Target runtime drop down list and add tomcat 7 as follows

New Server Runtime
New Server Runtime

3. Choose tomcat 7 installation directory

2013-06-05 08_09_31-New Server Runtime Environment

4. Click next until you get the Web module dialog. Check "Generate web.xml deployment descriptor"

2013-06-05 08_10_24-New Dynamic Web Project

5. Your project named JSF2HelloWorld will be created. Right click on project in project explorer and click on Project properties. You will see this dialog

2013-06-05 08_11_55-Properties for JSF2HelloWorld

6. Select “ Project facets  ” option and check “ JavaServer Faces  ” tab. Choose the version 2.1 or whatever is available. After doing this, you will see a message “ Further configuration required “. Click on it and you will see following dialog.

2013-06-05 08_17_57-Modify Faceted Project

7. Click the download option and eclipse will search for available JSF2 implementation libraries. We will choose mojara implementation.

2013-06-05 08_19_17-Download Library

8. Click next and you will see the mojarra library downloaded so that you can use it in the project

2013-06-05 08_26_42-

Select it and click Finish. You will be able to see your web.xml is now configured for JSF. It will have following code.

 

9. Now the configuration required for using JSF is done. We can create a hello world page now. Create a new page and name it as helloWorld.xhtml.  Add following code to it.

 

You will notice the uri here. These refer to jsf core, facelets and html tags. It means we can use tags from these namespaces in this page as we have used <h:outputLabel>  tag. This is possible because we included the html uri.

10. Now we are ready to go. Just start your tomcat server. Right click Tomcat 7 in servers tab and click start. After it has started successfully, you can simply open your favourite web browser and hit following url

 

Thats it, the page should display hello world message now. Hope this helped 🙂

 

Share Button

Prasad Kharkar

Prasad Kharkar is a java enthusiast and always keen to explore and learn java technologies. He is SCJP,OCPWCD, OCEJPAD and aspires to be java architect.

73 thoughts on “Creating JSF 2 Hello World Application in Eclipse

  • Pingback:Configure JSF and JPA in eclipse | theJavaGeek

  • Pingback:Configure primefaces with eclipse | theJavaGeek

  • Pingback:Login application in JSF | theJavaGeek

  • June 20, 2014 at 5:49 pm
    Permalink

    Wow it too nice tutorial with all snapshot .It is very good for beginners so helped me a lot.Keep it up.

    Reply
  • August 12, 2014 at 5:09 pm
    Permalink

    wow this is very nice

    Reply
  • September 3, 2014 at 1:31 am
    Permalink

    Hello Devender,
    your tutorial is really well written… except for the very last step. In step 9. you wrote, “…Create a new page and name it as helloWorld.xhtml…” This means absolutely nothing to a beginner because there is no option in Eclipse to “create a page”. I had no idea what you meant, sorry. The server is expecting to find the helloWorld.xhtml file somewhere in the project landscape, but where exactly is that?

    Reply
    • September 3, 2014 at 11:26 am
      Permalink

      Hello amger, thank you for pointing out. Here is what you should do to create new file.
      In eclipse menu, File – > New -> File. then name the new file as HelloWorld.xhtml

      By the way, my name is Prasad and not Devender 🙂

      Reply
    • June 27, 2016 at 12:52 am
      Permalink

      Eclipse will notify you with a warning if you attempt to create the *.xtml file outside of the Web-Content folder stating that it won’t be a deployable resource.

      Reply
  • September 12, 2014 at 12:11 pm
    Permalink

    Hi Prasad,
    I am getting a 404 – resource not found when i rum the application.
    following are the jars used.
    jsf-impl.jar
    jsf-api.jar
    jstl.jar
    common-logging.jar
    common-beanutils.jar
    common-collections.jar
    common-chain.jar
    common-digester.jar

    Reply
  • September 12, 2014 at 5:42 pm
    Permalink

    Hi prasad.
    The problem is been resolved!! apparently i had older version of jar. updating the jars to latest had solved the occurred problem.
    But now i am not able to see the value in jsf : outputlabel,
    though the page is been loaded and any static message in html is been printed
    what could be the problem.

    Reply
  • October 14, 2014 at 12:18 am
    Permalink

    i have read it and found so interested but i feel a little bit difficulties , i want to develop an application using JSF so please would u tell me how to create it from the beginning specially the configuration part. i need to know how to configure it if there is some part left or is it the whole processes to configure tomcat to develop jsf application. or please would u tell or direct me a video tutorial that u know or did before. use my email for contacting me.
    thank u replying
    Best regarding

    Reply
  • November 27, 2014 at 1:28 pm
    Permalink

    If library download do not provide the required libraries so what to do?????

    Reply
  • December 4, 2014 at 10:45 pm
    Permalink

    Hi,

    prasad .

    tihs is sudhakar am beginner of jsf to guide me, actually am totally new of jsf in my project jsf used …….and guide what are the main thing of jsf…………..

    Reply
  • December 15, 2014 at 6:38 am
    Permalink

    I followed all the steps written on here. But I too got the 404 error.
    I want to post the screenshot but how would I do it on here?

    Reply
    • June 24, 2015 at 2:46 pm
      Permalink

      open the window and press print screen key in your keyboard. then you post the snapshot

      Reply
  • February 4, 2015 at 12:07 pm
    Permalink

    The post is helpful Thank You for that, please guide me with how to attach all libraries
    in lib files and how to work with data base with small example like add update and delete

    Reply
  • February 26, 2015 at 12:04 pm
    Permalink

    Hi, Prasad.
    I followed your steps to build JSF2HelloWorld. But when I entered http://localhost:8080/JSF2HelloWorld/faces/helloWorld.xhtml in my browser, I saw the raw helloWorld.xhtml file(No “Hello World” is displayed).

    I thought there should be something that is able to convert *.xhtml file to *.html file; but I did’t have that.

    I have jsf-api.jar, jsf-facelets.jar, jsf-impl.jar, jstl.jar in my WEB-INF\lib. Are these all the *.jar I need?

    Reply
    • February 27, 2015 at 12:42 pm
      Permalink

      Hi Iyen, It seems that web.xml configuration is something wrong. Please configure the FacesSerlvet properly and yes, the jar files are needed.

      Reply
      • June 12, 2015 at 6:57 pm
        Permalink

        —java—

        package com.jsf;

        import java.io.Serializable;

        import javax.faces.bean.ManagedBean;

        @ManagedBean(name=”hello”)
        public class Hello implements Serializable{

        private static final long serialVersionUID = -6913972022251814607L;

        private String s1 = “Hello World!!”;

        public String getS1() {
        System.out.println(s1);
        return s1;
        }

        public void setS1(String s1) {
        this.s1 = s1;
        }

        }

        —–xhtml—–

        Hello World JSF Example

        #{hello.s1}

        ——-

        while runnig home.xhtml i m getting result as #{hello.s1} ..it is not hitting java class..can you please tell solution

        Reply
          • June 16, 2015 at 4:40 pm
            Permalink

            No Error..The out put is coming like #{hello.s1}

          • June 16, 2015 at 4:41 pm
            Permalink

            Hello World JSF Example

            #{hello.s1}

  • May 2, 2015 at 12:15 pm
    Permalink

    Wow. Wonderful example. Not outdated definitely.!! It works on my machine. I am a beginner with JSF and could easily follow the steps given here.. I would definitely look forward for more info on JSF from you. Please help.

    Reply
    • May 4, 2015 at 10:21 am
      Permalink

      Hi Pavan, I’m glad you found it useful. I’m going to provide more jsf tutorials soon.

      Reply
  • May 25, 2015 at 6:31 am
    Permalink

    Hi Prasad, this JSF tutorial is soooooo easy to understand and it is very helpful to me, and if you have any tutorial for JQuery/AngularJs/Ajax… please let me know.
    Thank You very much…….

    Reply
  • June 8, 2015 at 4:12 pm
    Permalink

    Hi Prasad.
    Thank you so much about this tutorial.
    I have some questions:
    + In step 9: Where does the “helloWorld.xhtml” locate?
    I have completed all the following step, but when I start the Tomcat server and access this URL in the browser and then it response error 404
    “http://localhost:8080/DemoJSF/helloWorld.xhtml”
    (My Eclipse Project name’s DemoJSF and the helloWorld.xhtml file is under the root folder.)

    Please let me know.
    Would you mind sending me an reply email? my gmail: hai.nd46@gmail.com

    Thank you so much….

    Reply
  • June 16, 2015 at 2:17 pm
    Permalink

    Hi Prasad,
    I am new to JSF as well as new to this website .My problem is
    when i am running a JSF project it’s showing me some error like this:
    #{helloWorld.xyz}.But when I am running .xhtml as a single page i am getting the required output i.e.”hello”.
    Plz give me the solution to this problem

    Reply
  • June 20, 2015 at 6:56 pm
    Permalink

    Can you tell me what are the required jar that are to be present under lib of WEB-INF folder?
    P.S: Sorry for asking silly question.:( I am very new to programming.

    Reply
  • June 22, 2015 at 12:47 pm
    Permalink

    very nice and very useful to me.

    Reply
  • June 23, 2015 at 4:42 pm
    Permalink

    Several ports (8005, 8080, 8009) required by Tomcat v7.0 Server at localhost (2) are already in use. The server may already be running in another process, or a system process may be using the port. To start this server you will need to stop the other process or change the port number(s).

    How to create the above error. Another server is not start but this msg box will display plz help me

    Reply
    • June 23, 2015 at 5:35 pm
      Permalink

      hi Karthika, I think there was a problem with proper shutdown of tomcat server and hence ports weren’t freed. To check whether these ports are still in use, run command netstat -ano on command prompt. If you see any processes running on required ports, you need to kill them using taskkill /F /PID on command line. Again check whether ports are free using netstat -ano. After this start tomcat again it should be able to start properly.

      Reply
      • June 24, 2015 at 10:00 am
        Permalink

        Where does the “helloWorld.xhtml” locate?
        I have completed all the following step, but when I start the Tomcat server and access this URL in the browser and then it response error 404
        “http://localhost:8080/DemoJSF/helloWorld.xhtml”
        (My Eclipse Project name’s first and the helloWorld.xhtml file is under the root folder.)

        Reply
        • June 24, 2015 at 10:40 am
          Permalink

          your url should be something like “http://localhost:8080/DemoJSF/faces/helloWorld.xhtml”. According to our web.xml configuration, faces servlet is mapped for /faces/* url pattern.

          Reply
        • June 24, 2015 at 11:25 am
          Permalink

          HTTP Status 404 – /abi/faces/jsfpages/NewFile.html

          ——————————————————————————–

          type Status report

          message /abi/faces/jsfpages/NewFile.html

          description The requested resource is not available.

          ——————————————————————————–

          Apache Tomcat/7.0.62

          how could i solve this problem

          Reply
          • June 24, 2015 at 11:54 am
            Permalink

            Hi Nivedha, according to web.xml configuration, the FacesServlet recognizes .xhtml files to be processed by jsf. your urls should end with .xhtml and not .html. I think it should solve the problem.

          • June 24, 2015 at 12:40 pm
            Permalink

            no i could also give the .xhtml that the same problem would display

          • June 30, 2015 at 7:30 pm
            Permalink

            add your xhtml file in webcontent. for all who are getting error 500. For error 404 make sure your web.xml is correctly configured. Please copy your web,xml if error still exists

  • August 5, 2015 at 1:15 am
    Permalink

    Did exactly as you say – went through 3 times and still getting this

    SEVERE: Servlet.service() for servlet [Faces Servlet] in context with path [/JSF2HelloWorld] threw exception
    com.sun.faces.context.FacesFileNotFoundException: /helloWorld.xhtml Not Found in ExternalContext as a Resource

    Reply
    • August 5, 2015 at 3:22 am
      Permalink

      Finally got it. Somehow the eclipse jdk was out of sync with the jsf facet declaration. Having problems teaches you more than a quick success!
      Thanks for the tutorial!!

      Reply
      • August 5, 2015 at 2:27 pm
        Permalink

        Great that it worked out. I had taken 15 days to understand and make a Hello World program in servlet 🙂 You are much quicker. Keep learning.

        Reply
  • November 27, 2015 at 12:01 pm
    Permalink

    hi, i amm getting this kind of error .i am unable to resolve plz look into this

    HTTP Status 500 –

    type Exception report

    message

    description The server encountered an internal error () that prevented it from fulfilling this request.

    exception

    javax.servlet.ServletException: Error instantiating servlet class javax.faces.webapp.FacesServlet
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
    org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:541)
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:383)
    org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:243)
    org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:188)
    org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:288)
    java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    java.lang.Thread.run(Thread.java:717)

    root cause

    java.lang.ClassNotFoundException: javax.faces.webapp.FacesServlet
    org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1676)
    org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1521)
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
    org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:541)
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:383)
    org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:243)
    org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:188)
    org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:288)
    java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    java.lang.Thread.run(Thread.java:717)

    note The full stack trace of the root cause is available in the Apache Tomcat/7.0.8 logs.

    Reply
  • November 27, 2015 at 12:02 pm
    Permalink

    hi, i am unable to solve this issue,

    HTTP Status 500 –

    type Exception report

    message

    description The server encountered an internal error () that prevented it from fulfilling this request.

    exception

    javax.servlet.ServletException: Error instantiating servlet class javax.faces.webapp.FacesServlet
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
    org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:541)
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:383)
    org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:243)
    org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:188)
    org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:288)
    java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    java.lang.Thread.run(Thread.java:717)

    root cause

    java.lang.ClassNotFoundException: javax.faces.webapp.FacesServlet
    org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1676)
    org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1521)
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
    org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:541)
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:383)
    org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:243)
    org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:188)
    org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:288)
    java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    java.lang.Thread.run(Thread.java:717)

    note The full stack trace of the root cause is available in the Apache Tomcat/7.0.8 logs.

    Reply
  • December 15, 2015 at 7:20 am
    Permalink

    Hello Prasad,

    I really beginner in jsf.

    I followed your tutorial, and get Error 404 when deploying to server.

    description The requested resource is not available.

    Apache Tomcat/7.0.65

    What is the problem, can you help me

    Reply
  • February 25, 2016 at 9:47 am
    Permalink

    thanks Prasad,
    you have an excellent way in explanation. So we need tutorials in jsf.

    Reply
  • February 28, 2016 at 1:17 pm
    Permalink

    Hi Prasad,

    First of all, excellent tutorial and a great way to explain 🙂
    Secondly, I followed all steps but I get error: “helloWorld.xhtml Not Found in ExternalContext as a Resource”. My apache tomcat log folder is empty. Any suggestions on what could be wrong? 🙁

    -Amala.

    Reply
  • February 28, 2016 at 1:17 pm
    Permalink

    Hi Prasad,

    First of all, excellent tutorial and a great way to explain 🙂
    Secondly, I followed all steps but I get error: “helloWorld.xhtml Not Found in ExternalContext as a Resource”. My apache tomcat log folder is empty. Any suggestions on what could be wrong? 🙁

    Reply
      • February 29, 2016 at 11:30 am
        Permalink

        It is in WebContent folder under the project JSF2HelloWorld.

        Reply
        • February 29, 2016 at 11:37 am
          Permalink

          Also, it was working for a few hours. Now it says ‘The requested resource is not available.’ again 🙁

          I did not modify anything.

          Reply
          • February 29, 2016 at 2:20 pm
            Permalink

            Please try cleaning your tomcat and re-deploying it.

  • February 29, 2016 at 12:33 pm
    Permalink

    I am getting HTTP Status 404 – Servlet Faces Servlet is not available

    type:Status report
    message Servlet Faces Servlet is not available
    description The requested resource (Servlet Faces Servlet is not available) is not available.

    What i want to do for this error?

    Reply
  • March 10, 2016 at 6:09 am
    Permalink

    Hi Prasad , I’m working trying to run this application in weblogic 12.1.2 and the deployment is failing with below error. Can you please help?

    Mar 9, 2016 7:27:35 PM EST> <Critical error during deployment:
    com.sun.faces.config.ConfigurationException: java.util.concurrent.ExecutionException: javax.faces.FacesException: java.net.URISyntaxException: Illegal character in opaque part at index 38: zip:C:/workspace_12C/PCC/libraries/JSF 2.1 (Mojarra 2.1.6-FCS)/mojarra-2.1.6-FCS/lib/javax.faces.jar!/META-INF/mojarra_ext.taglib.xml
    at com.sun.faces.config.ConfigManager.getConfigDocuments(ConfigManager.java:661)
    at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:363)
    at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:216)
    at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:661)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    Truncated. see log file for complete stacktrace
    Caused By: java.util.concurrent.ExecutionException: javax.faces.FacesException: java.net.URISyntaxException: Illegal character in opaque part at index 38: zip:C:/workspace_12C/PCC/libraries/JSF 2.1 (Mojarra 2.1.6-FCS)/mojarra-2.1.6-FCS/lib/javax.faces.jar!/META-INF/mojarra_ext.taglib.xml
    at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:252)
    at java.util.concurrent.FutureTask.get(FutureTask.java:111)
    at com.sun.faces.config.ConfigManager.getConfigDocuments(ConfigManager.java:648)
    at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:363)
    at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:216)
    Truncated. see log file for complete stacktrace
    Caused By: javax.faces.FacesException: java.net.URISyntaxException: Illegal character in opaque part at index 38: zip:C:/workspace_12C/PCC/libraries/JSF 2.1 (Mojarra 2.1.6-FCS)/mojarra-2.1.6-FCS/lib/javax.faces.jar!/META-INF/mojarra_ext.taglib.xml
    at com.sun.faces.config.configprovider.MetaInfFaceletTaglibraryConfigProvider.getResources(MetaInfFaceletTaglibraryConfigProvider.java:108)
    at com.sun.faces.config.ConfigManager$URITask.call(ConfigManager.java:1178)
    at com.sun.faces.config.ConfigManager$URITask.call(ConfigManager.java:1147)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
    Truncated. see log file for complete stacktrace
    Caused By: java.net.URISyntaxException: Illegal character in opaque part at index 38: zip:C:/workspace_12C/PCC/libraries/JSF 2.1 (Mojarra 2.1.6-FCS)/mojarra-2.1.6-FCS/lib/javax.faces.jar!/META-INF/mojarra_ext.taglib.xml
    at java.net.URI$Parser.fail(URI.java:2829)
    at java.net.URI$Parser.checkChars(URI.java:3002)
    at java.net.URI$Parser.parse(URI.java:3039)
    at java.net.URI.(URI.java:595)
    at com.sun.faces.config.configprovider.MetaInfFaceletTaglibraryConfigProvider.getResources(MetaInfFaceletTaglibraryConfigProvider.java:106)
    Truncated. see log file for complete stacktrace
    >

    Reply
  • June 6, 2016 at 12:46 pm
    Permalink

    HTTP Status 404 – /JsfHelloWorld/

    ——————————————————————————–

    type Status report

    message /JsfHelloWorld/

    description The requested resource is not available.

    ——————————————————————————–

    Apache Tomcat/7.0.61

    please help me ..what to do further.

    Reply
    • June 6, 2016 at 1:41 pm
      Permalink

      Please check whether your context name is correct. Also, please check web.xml for correct jsf configuration.

      Reply
  • October 15, 2016 at 10:05 am
    Permalink

    Where to create helloWorld.xhtml. I mean in which folder?

    Reply
  • October 16, 2016 at 3:06 pm
    Permalink

    hello
    i am not able to run this application
    can you please post your foler structure
    thanks
    pooja

    Reply
  • November 23, 2016 at 9:14 pm
    Permalink

    Hello Prasad,

    its really nice tutorial and you have clearly explained everything what we need.

    By the way, I have one strange requirement, is it possible to create JSF2 application without any xhtml files?
    All components in xhtml files can be created from java also, so, I need a system the gets a request and response is created dynamically from java with all components created by Java itself, so that I do not need to create a bunch of xhtml files.

    Thanks in advance!

    /KRISHNA

    Reply
  • December 27, 2016 at 10:01 pm
    Permalink

    Error 500

    Message: /helloworld.xhtml Not Found in ExternalSource as a Resource

    note: The full stack trace of the root cause is available in the Apache Tomcat/7.0.73 logs

    My main file name is “Timeout_Session”

    and the

    new file in “Step 9” which you made us create

    (I am confused as to where to make it, i.e. in the src
    or outside all the folders in the main folder
    which I have named “Timeout_Session)

    http://localhost:8080/Timeout_Session/faces/helloworld.xhtml

    Thank you in Advance!

    Reply
    • December 27, 2016 at 10:20 pm
      Permalink

      Got the answer,

      We are supposed to add the filename “helloworld.xhtml” in the Web Content Folder.

      -JSF2HelloWorld
      —WebContent
      —–META-INF
      —–WEB-INF
      —–helloworld.xhtml

      all 3 in same folder

      Reply
  • January 10, 2017 at 1:27 am
    Permalink

    Hi, I have a problem

    SEVERE: Servlet.service() for servlet [Faces Servlet] in context with path [/JSF2Example] threw exception [Unable to create managed bean hello. The following problems were found:
    – Bean or property class resources.Hello for managed bean hello cannot be found.] with root cause
    com.sun.faces.mgbean.ManagedBeanCreationException: Unable to create managed bean hello. The following problems were found:
    – Bean or property class resources.Hello for managed bean hello cannot be found.

    I hope you can help me, ty

    Reply
  • January 29, 2017 at 3:59 pm
    Permalink

    Hi Prasad,
    I am getting a 404 – resource not found when i rum the application.

    web.xml—>

    test_web
    <!–
    index.html
    index.htm
    index.jsp
    default.html
    default.htm
    default.jsp
    –>

    Faces Servlet
    javax.faces.webapp.FacesServlet
    1

    Faces Servlet
    /faces/*

    State saving method: ‘client’ or ‘server’ (=default). See JSF Specification 2.5.2
    javax.faces.STATE_SAVING_METHOD
    client

    javax.servlet.jsp.jstl.fmt.localizationContext
    resources.application

    com.sun.faces.config.ConfigureListener

    Reply
  • April 20, 2017 at 6:43 pm
    Permalink

    Great tutorial….
    Faced server configuration error with Tomcat version 7.
    Worked fine with Tomcat version 6.

    Reply
  • Pingback:Http Status 404 Error In Eclipse Using Tomcat

  • Pingback:How To Resolve Http Status 404 Error In Eclipse

  • December 12, 2017 at 1:48 am
    Permalink

    you are already using maven.why download jsf library.You can automate with maven ????

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *