Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 847655
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T06:49:09+00:00 2026-05-15T06:49:09+00:00

We have faces-config.xml in JSF 1.0 where we entry about managed-beans, dependencies & navigations

  • 0

We have faces-config.xml in JSF 1.0 where we entry about managed-beans, dependencies & navigations etc.

I was developing a sample project using JSF 2.0. But, as I don’t know annotation, I need to include face-config.xml externally. Please, provide the solution for it, as in JSF 2.0 we don’t need to include it. What is reason behind it? How do we set a bean as managed-bean. What is annotation? How is it used?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T06:49:10+00:00Added an answer on May 15, 2026 at 6:49 am

    (…) in JSF 2.0 we don’t need to include it. What is reason behind it?

    In three words: ease of development. There is just less code to write — boilerplate code is removed, defaults are used whenever possible, and annotations are used to reduce the need for deployment descriptors.

    How do we set a bean as managed-bean. What is annotation? How is it used?

    Managed beans are identified using the @ManagedBean annotation. The scope of the bean is also specified using annotations (@RequestScoped, @SessionScoped, @ApplicationScoped, etc).

    So the following in JSF 1.0:

    <managed-bean>
      <managed-bean-name>foo</managed-bean-name>
      <managed-bean-class>com.foo.Foo</managed-bean-class>
      <managed-bean-scope>session</managed-bean>
    </managed-bean>
    

    Can be rewritten as such in JSF 2.0:

    @ManagedBean
    @SessionScoped
    public class Foo {
        //...
    }
    

    And referred like this in a Facelet page:

    <h:inputText label="eMailID" id="emailId" 
    value="#{foo.email}" size="20" required="true"/>
    

    (By default, the name of the managed bean will be the name of the annotated class, with the first letter of the class in lowercase.)

    See also

    • What’s New in JSF 2?
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i'm using prettyfaces 3.1.0 with JSF1.2 and Seam 2.2.0. I have the following pretty-config.xml:
If A.jsf have a commandLink that will navigation to B.jsf , then I would
I'm using jsf 2 + jaas + ssl + tomcat 6.0.26 I have in
I want to provide different languages in my jsf-application. I've found that explanation and
I have a web-application where the users can be sent directly to some specific
I am currently using JSF 2.0 and Richfaces 3.3.3 and it's working fine. Now
HI, I want to know how to implement Validator in JSF. What is the
In order to use the @Autowire annotation, the object where you use the annotation
I am trying to override renderer for h:selectBooleanCheckbox (for the reasons explained here ):
Using a DataModel<MyObject> , I fill a data table according to this response Now

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.