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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T14:45:52+00:00 2026-05-25T14:45:52+00:00

I defined viewParam to process a GET request but the session bean is null

  • 0

I defined viewParam to process a GET request but the session bean is null.

/treeTable2.xhtml @28,119 value="#{conformanceProfileController.dataValueAssertionController.library_line}": Target Unreachable, identifier 'conformanceProfileController' resolved to null

GET request:

treeTable2.jsf?category=Message

XHTML code

<f:metadata>
  <f:viewParam name="category" value="#{conformanceProfileController.category}" />
</f:metadata>

The Bean

@ManagedBean
@SessionScoped
public class ConformanceProfileController implements Serializable {
    private String category;

    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }
}

My development server is Tomcat 7.0 and I use Mojarra 2.1.0

EDIT: I created a simplified version with a new page and new bean. The code in the post is the same as the one on my machine.

XHTML Code:

<html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    >
<h:head>
</h:head>
<f:metadata>
    <f:viewParam name="category" value="#{myBean.category}" />
</f:metadata>
<h:body>
</h:body>
</html>

MyBean:

import java.io.Serializable;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;

@ManagedBean
@SessionScoped
public class MyBean implements Serializable {
    private String category;

    public MyBean() {
        System.out.println("Creation");
    }

    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

}

The GET request: treeTable3.jsf?category=Message

The error message: /treeTable3.xhtml @8,60 value="#{myBean.category}": Target Unreachable, identifier 'myBean' 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-25T14:45:53+00:00Added an answer on May 25, 2026 at 2:45 pm

    Mojarra 2.1.0 do not work in Tomcat/Jetty due to a bug in annotation scanning. Upgrade to at least 2.1.1 or the current 2.1.3.

    This has nothing to do with view parameters or session scoped beans. It will just fail in all cases where you expect a @ManagedBean.

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

Sidebar

Related Questions

I'm getting an error here that says I haven't defined a method, but it
I defined a generator for a JPA class: <sequence-generator name=MY_SEQ allocation-size=-1 sequence-name=MY_SEQ initial-value=100000000 />
I defined an equals method, but Hashtable ignores it. Why?
I defined a variable which will get user's input: var input = USER_INPUT; then,
Defined this way, we can do neither ++x++ nor ++x-- . But on the
I have the following simple view main.xhtml , the request URL would be something
I defined a record named log . I want to create an mnesia table
User-Defined Functions & Collating Sequences Full support for user-defined functions and collating sequences means
I defined a Controller to force authentication by using the [Authorize] attribute. When a
NSInteger / NSUInteger are Cocoa-defined replacements for the regular built-in types. Is there any

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.