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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T21:24:38+00:00 2026-05-30T21:24:38+00:00

I am really new to JSF but here is my problem : WARNING: #{Generate.viewReportPDF}:

  • 0

I am really new to JSF but here is my problem :

WARNING: #{Generate.viewReportPDF}: javax.el.PropertyNotFoundException: Target Unreachable, identifier 'Generate' resolved to null

I searched and try a lot of things but it didn’t work so I am asking for your help :

Here is my
Generate.java in package com.test :

package com.test;

import javax.faces.context.FacesContext;
import javax.inject.Scope;
import javax.servlet.http.HttpServletResponse;
import javax.xml.transform.TransformerException;
import net.sf.jasperreports.engine.*;
import net.sf.jasperreports.engine.design.JasperDesign;
import net.sf.jasperreports.engine.xml.JRXmlLoader;
import javax.faces.bean.ManagedBean;

@ManagedBean
public class Generate {
    ...

    public void viewReportPDF () throws IOException {
     ...   
    }

}

Here is my web.xml (in WEB-INF)

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
    <context-param>
        <param-name>javax.faces.PROJECT_STAGE</param-name>
        <param-value>Development</param-value>
    </context-param>
    <context-param>
    <param-name>javax.faces.CONFIG_FILES</param-name>
    <param-value>/WEB-INF/faces-config.xml</param-value>
</context-param>

    <servlet>
        <servlet-name>Faces Servlet</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>
    <session-config>
        <session-timeout>
            30
        </session-timeout>
    </session-config>
    <welcome-file-list>
        <welcome-file>faces/init.jsp</welcome-file>
    </welcome-file-list>
</web-app>

Here my faces-config.xml (in WEB-INF) :

<managed-bean>
        <managed-bean-name>Generate</managed-bean-name>
        <managed-bean-class>
            com.test.Generate
        </managed-bean-class>
        <managed-bean-scope>session</managed-bean-scope>
</managed-bean>

here my init.jsp :

<jsp:root version="1.2" xmlns:f="http://java.sun.com/jsf/core"
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:jsp="http://java.sun.com/JSP/Page">
        <jsp:directive.page contentType="text/html;charset=UTF-8"
            pageEncoding="UTF-8" />
        <f:view>
            <html>
            <head>
            <title>Test iReport With JSF</title>
            </head>
            <body style="background-color: #fff4db">
            <h:form id="reportForm" target="report">
                <h:commandButton id="pdfButton" value="Visualiser PDF"
                    styleClass="buttonStyle" action="#{Generate.viewReportPDF}" />

            </h:form>
            </body>
            </html>
        </f:view>
    </jsp:root>

And when I run I have this error :

WARNING: #{Generate.viewReportPDF}: javax.el.PropertyNotFoundException: Target Unreachable, identifier ‘Generate’ 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-30T21:24:40+00:00Added an answer on May 30, 2026 at 9:24 pm

    The Java naming conventions state that instance variable names starts with lowercase. You need to use #{generate.viewReportPDF} instead of #{Generate.viewReportPDF}.

    If you really insist in using a capitalized instance variable name (which is bad), then you can always override it in the @ManagedBean annotation:

    @ManagedBean(name="Generate")
    @SessionScoped
    public class Generate {
    

    Note that I added the @SessionScoped annotation, you forgot that. You should also remove that superfluous and old fashioned managed bean configuration in faces-config.xml which would only clash with the annotations and override them. I would also recommend using Facelets instead of the ancient JSPX.

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

Sidebar

Related Questions

I'm really new to Python, but I've picked a problem that actually pertains to
I'm really new to JSF but what I need to do is a webpage
I'm really new to ASP.Net Mvc, but not new to Asp.Net. I was aware
I'm really new to HTML, but I can't find anywhere how to return the
Im really really new to Javascript but Ive got this script that loads the
Hi I am really new to Jquery and have a problem with my script
I am quite new to ICEfaces but already have experience with JSF/Facelets and the
I really new to Python and coding in general, but I have been making
Being really new to wx, I'm wondering if there is an IDE (especially for
im really new to flash, how do i go about creating a variable which

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.