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 7185219
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T18:22:06+00:00 2026-05-28T18:22:06+00:00

I am developing a web application using JSF on Netbeans 7.0. I have created

  • 0

I am developing a web application using JSF on Netbeans 7.0. I have created 2 pages: one for entering persons name and other to display that name. I am using a java bean with get and set methods.

I get an error when I submit my form on first page the code.

This is my first page index.xhtml to accept name:

<h:form>
    Enter your Name : <h:inputText value="#{demoBean.name}" required="true"/>
    <br/> <h:commandButton value="Submit" action="welcome.xhtml"/>    
</h:form>

This is the other page welcome.xhtml to display the name:

<h:body>
    Hello #{demoBean.name}
</h:body>

This is the managed bean demoBean.java:

import javax.faces.bean.ManagedBean; 
import javax.faces.bean.SessionScoped; 

@ManagedBean()
@SessionScoped

public class demoBean {
    private String name;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}

This is the error which I got when I submit the fist page:

/index.xhtml @10,86 value=”#{demoBean.name}”: Target Unreachable, identifier ‘demoBean’
resolved to null

  • 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-28T18:22:07+00:00Added an answer on May 28, 2026 at 6:22 pm

    The JSP framework expects your bean class name to conform to the Java naming conventions, i.e. be “CamelCased” (e.g. DemoBean), in which case it will assume the bean will be referenced in the JSP by the default name formed by converting the first character of the bean name to lower case (demoBean).

    As you have deviated from the framework’s expectations, you need to indicate the name by which you refer to your bean in the JSPs, either by specifying it in the @ManagedBean annotation or in the optional faces-config.xml file.

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

Sidebar

Related Questions

I'm developing a web application using Java EE6 and JSF 2.0. I have a
I'm developing a web application using JSF 2.0, NetBeans 6.9.1, GlassFish Server 3.1, mojarra
I am developing a web application using JSF and JPA(Eclipse link). I have two
I am developing a JSF web application on a Windows box using Emacs as
I am developing a web application using Struts 2.1.2 and Hibernate 3.2.6.GA. I have
I am developing an web application using php. One of the requirement is the
I have 5 years of work experience in developing WEB and WIN application using
We currently maintain a JSF application developed using Netbeans 5.5.1 using the Visual Web
we are developing a web application using MVC3 and VS2010. We have some pdf
we are developing a web application using MVC3 and Jquery. we have a situation

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.