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

  • SEARCH
  • Home
  • 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 3397240
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T04:30:17+00:00 2026-05-18T04:30:17+00:00

In my JSF 2.0 project i have 2 classes: public class driver { private

  • 0

In my JSF 2.0 project i have 2 classes:

public class driver {  
    private String name = "Mr Taxi";  

    public String getName {  
        return name;  
    }  
}  

…

import driver;  
public class CarBean {

    private Driver driver;  
    private String anotherProperty;  

    public String getAnotherProperty {  
        return anotherProperty;  
    }   
}  

And the jsf file:

<!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:f="http://java.sun.com/jsf/core"
          xmlns:h="http://java.sun.com/jsf/html"
          xmlns:c="http://java.sun.com/jsp/jstl/core">
    <h:body>
        The car has a driver with name: #{carBean.driver.name} <--------Focus on this one

    </h:body>
</html>   

I know that the above example do not work. But is there any way to access the driver object getName method from the jsf file? Or do I have to make a new method “getDriverName” in the CarBean class?

Can you please help med guys? B.R

  • 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-18T04:30:18+00:00Added an answer on May 18, 2026 at 4:30 am

    Look at this example, its simple enough:

    Injecting Managed beans in JSF 2.0

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a War and Jar project in my Eclipse-based JSF project. I have
Is there any documentation about introducing jBoss seam to an old Hibernate/JSF project? Have
I work with my student group on a project : We have some problems
I'm using JSF 2.0 and want to fill a selectOneMenu with the values of
Let's consider that I want to extend an existing JSF component, such as the
JSF 1.1 and websphere 6.1 was working properly in my case. Once I deployed
I have an OSGi plugin with an activator that I am requesting to start
I have a report that we need to link (which we've checked to be
I am looking for a simple tool that generates a catalog of all used
As RESTful web services are url based aren't objects, we can't call methods on

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.