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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T01:35:16+00:00 2026-05-31T01:35:16+00:00

I have this managed bean which takes two values from database’s table import java.io.Serializable;

  • 0

I have this managed bean which takes two values from database’s table

import java.io.Serializable;
import javax.enterprise.context.SessionScoped;
// or import javax.faces.bean.SessionScoped;
import javax.inject.Named;
/* include SQL Packages */
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import javax.sql.DataSource;
import javax.annotation.Resource;
import javax.faces.context.FacesContext;
import javax.inject.Inject;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
// or import javax.faces.bean.ManagedBean;   

import org.glassfish.osgicdi.OSGiService;

@Named("DashboardController")
@SessionScoped
public class Dashboard implements Serializable {

    private String SessionTTL = null;
    private String MaxActiveUsers = null;
    private String stringone = null;
    private String stringtwo = null;
    private String SQL_Statement = null;
    private String Password;
    private String User;

    public Dashboard(){
    }

    /* Call the Oracle JDBC Connection driver */
    @Resource(name = "jdbc/Oracle")
    private DataSource ds;

    public String getSessionTTL() {
        return SessionTTL;
    }

    public void setSessionTTL(String SessionTTL) {
        this.SessionTTL = SessionTTL;
    }

    public String getMaxActiveUsers() {
        return MaxActiveUsers;
    }

    public void setMaxActiveUsers(String MaxActiveUsers) {
        this.MaxActiveUsers = MaxActiveUsers;
    }


    //connect to DB and get settings values
    public List<Dashboard> getDashboardList()throws SQLException{

        List<Dashboard> list = new ArrayList<Dashboard>();

        if(ds == null) {
                throw new SQLException("Can't get data source");
        }

        Connection conn = ds.getConnection(); 

        if(conn == null) {
                throw new SQLException("Can't get database connection");
        }

        PreparedStatement ps = conn.prepareStatement("SELECT * from GLOBALSETTINGS");

        try{
            //get data from database        
            ResultSet result = ps.executeQuery();
            while (result.next()){
                Dashboard cust = new Dashboard();
                cust.setSessionTTL(result.getString("SessionTTL"));
                cust.setMaxActiveUsers(result.getString("MaxActiveUsers"));
                list.add(cust);
            }
        }
        catch(Exception e1){
            // Log the exception.
        }
        finally{
            try{
                ps.close();
                conn.close();
            }
            catch(Exception e2){
                // Log the exception.
            }
        }
        return list; 
    }
}

This is the code of the JSF table which must display the values:

                    <h:dataTable id="books"
                             columnClasses="list-column-center,
                             list-column-right, list-column-center,
                             list-column-right" headerClass="list-header"
                             rowClasses="list-row" styleClass="list-
                             background" value="#{DashboardController.getDashboardList()}" var="store">   
                    <h:column>
                        <f:facet name="header">
                          <h:outputText  value="#{store.SessionTTL}"/>
                        </f:facet>
                         <h:outputText value="#{store.SessionTTL}"/>
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                          <h:outputText  value="#{store.MaxActiveUsers}"/>
                        </f:facet>
                         <h:outputText value="#{store.MaxActiveUsers}"/>
                    </h:column>

                </h:dataTable> 

The problem is that I get this error when I try to run the JSF page:

javax.el.PropertyNotFoundException: /Settings.xhtml @82,69 value="#{store.SessionTTL}": The class 'com.DX_57.SM_57.Dashboard' does not have the property 'SessionTTL'.
    at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:111)
    at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:194)
    at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:182)
    at javax.faces.component.UIOutput.getValue(UIOutput.java:169)
    at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getValue(HtmlBasicInputRenderer.java:205)
    at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(HtmlBasicRenderer.java:355)
    at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeEnd(HtmlBasicRenderer.java:164)
    at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:875)
    at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:312)
    at com.sun.faces.renderkit.html_basic.TableRenderer.renderRow(TableRenderer.java:384)
    at com.sun.faces.renderkit.html_basic.TableRenderer.encodeChildren(TableRenderer.java:161)
    at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:845)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1757)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1760)
    at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:402)
    at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)
    at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:121)
    at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
    at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)
    at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1542)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:281)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
    at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
    at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317)
    at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
    at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849)
    at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746)
    at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045)
    at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228)
    at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
    at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
    at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
    at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
    at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
    at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
    at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
    at java.lang.Thread.run(Thread.java:722)

I have mistake somewhere but I cannot find it.

  • 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-31T01:35:18+00:00Added an answer on May 31, 2026 at 1:35 am

    Try to replace store.SessionTTL with store.sessionTTL. Property should start with lowercase character.

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

Sidebar

Related Questions

I have this managed bean which makes SQL queries to Oracle database and returns
I have this java code which is a part of a managed bean which
I have a managed bean which makes SQL queries to Oracle database. This is
I have a list of constant values which are stored in a database table.
I have a Controller bean (SearchController) that has two managed bean as managed properties
I have a session bean that uses Bean managed txns. This bean has one
I have a controller that is stateless which takes care of processing forms. This
I have an application scoped managed bean which main purpose is to serve the
I have a managed bean called: @ManagedBean(name=configBean) @SessionScoped public class configBean implements Serializable {
I have this line in a useful Bash script that I haven't managed to

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.