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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T16:57:32+00:00 2026-06-07T16:57:32+00:00

Very annoying. Don’t know why this error is coming. In the below code NOTE:

  • 0

Very annoying. Don’t know why this error is coming. In the below code

NOTE:

if I only use <td>${user.id}</td> than its printing id properly but on ${user.username} property generating error. See below JSP page code.

If I use below code in JSP page like to test than I get all the objects and properties


<c:forEach var="user" items="${users}" varStatus="i">
    <tr>
        <td>${users[i.index]}</td>
    </tr>                       
</c:forEach>

Result:

User[id=1,username=u1,password=p1,firstname=f1,lastname=l1,dob=2012-07-01,age=40]
User[id=2,username=u2,password=p2,firstname=f2,lastname=l2,dob=2012-07-02,age=39]
User[id=3,username=u3,password=p3,firstname=f3,lastname=l3,dob=2012-07-03,age=38]

ERROR:

09:49:49,047 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/crud_jsp_servlet_cdi_jdbc_tagfile].[jsp]] (http-localhost-127.0.0.1-8080-1) Servlet.service() for servlet jsp threw exception: javax.el.PropertyNotFoundException: The class 'com.myapp.dao.User' does not have the property 'username'.
    at javax.el.BeanELResolver.getBeanProperty(BeanELResolver.java:661) [jboss-el-api_2.2_spec-1.0.0.Final.jar:1.0.0.Final]
    at javax.el.BeanELResolver.getValue(BeanELResolver.java:290) [jboss-el-api_2.2_spec-1.0.0.Final.jar:1.0.0.Final]
    at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:175) [jboss-el-api_2.2_spec-1.0.0.Final.jar:1.0.0.Final]
    at org.apache.el.parser.AstValue.getValue(AstValue.java:169) [jbossweb-7.0.13.Final.jar:]
    at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:189) [jbossweb-7.0.13.Final.jar:]
    at org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:935) [jbossweb-7.0.13.Final.jar:]
    at org.apache.jsp.WEB_002dINF.admin.UserList_jsp._jspx_meth_c_005fforEach_005f0(UserList_jsp.java:137)
    at org.apache.jsp.WEB_002dINF.admin.UserList_jsp.access$1(UserList_jsp.java:114)
    at org.apache.jsp.WEB_002dINF.admin.UserList_jsp$Helper.invoke1(UserList_jsp.java:215)
    at org.apache.jsp.WEB_002dINF.admin.UserList_jsp$Helper.invoke(UserList_jsp.java:240)
    at org.apache.jsp.tag.web.layout_tag.doTag(layout_tag.java:120)
    at org.apache.jsp.WEB_002dINF.admin.UserList_jsp._jspx_meth_tags_005flayout_005f0(UserList_jsp.java:96)
    at org.apache.jsp.WEB_002dINF.admin.UserList_jsp._jspService(UserList_jsp.java:69)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) [jbossweb-7.0.13.Final.jar:]
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]

JSP Page:

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="tags" tagdir="/WEB-INF/tags"%>

<tags:layout path="${pageContext.request.contextPath}">
    <jsp:attribute name="search">
        <tags:search />
    </jsp:attribute>
    <jsp:body>
        <div class="mainDiv">
            <table class="table table-striped table-bordered table-condensed">
                <thead>
                    <tr>
                        <th>Id</th>
                        <th>UserName</th>
                        <th>Password</th>
                        <th>FirstName</th>
                        <th>LastName</th>
                        <th>Date of Birth</th>
                        <th>Age</th>
                        <th>Actions</th>
                    </tr>
                </thead>
                <tbody>
                    <c:forEach var="user" items="${users}">
                        <tr>
                            <td>${user.id}</td>
                            <td>${user.username}</td>
                            <td>${user.password}</td>
                            <td>${user.firstname}</td>
                            <td>${user.lastname}</td>
                            <td>${user.dob}</td>
                            <td>${user.age}</td>
                            <td><a href="#"><i class="icon-edit"></i></a> <a href="#"><i
                                    class="icon-trash"></i></a></td>
                        </tr>
                    </c:forEach>
                </tbody>
            </table>
        </div>
    </jsp:body>
</tags:layout>

User.java

package com.myapp.dao;

import java.sql.Date;


public class User {

    private Long id;
    private String username;
    private String password;
    private String firstname;
    private String lastname;
    private Date dob;
    private int age;

    public User(){
    };

    public User(Long id, String username, String password, String firstname, String lastname, Date dob, int age){

        this.id = id;
        this.username = username;
        this.password = password;
        this.firstname = firstname;
        this.lastname = lastname;
        this.dob = dob;
        this.age = age;
    }

    public Long getId(){
        return id;
    }

    public void setId(Long id){
        this.id = id;
    }

    public String getUserName(){
        return username;
    }

    public void setUserName(String username){
        this.username = username;
    }

    public String getPassword(){
        return password;
    }

    public void setPassword(String password){
        this.password = password;
    }

    public String getFirstName(){
        return firstname;
    }

    public void setFirstName(String firstname){
        this.firstname = firstname;
    }

    public String getLastName(){
        return lastname;
    }

    public void setLastName(String lastname){
        this.lastname = lastname;
    }

    public Date getDob(){
        return dob;
    }

    public void setDob(Date dob){
        this.dob = dob;
    }

    public int getAge(){
        return age;
    }

    public void setAge(int age){
        this.age = age;
    }

    public String getFullName(){
        return this.firstname + " " + this.lastname;
    }

}

Selvlet:

List<User> users = null;
        userDAO = new UserDAOJDBC();

        users = userDAO.listUsers();
        request.setAttribute("users", users);

        String path = "/WEB-INF/admin/UserList.jsp";
        getServletContext().getRequestDispatcher(path).forward(request, response);
  • 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-06-07T16:57:34+00:00Added an answer on June 7, 2026 at 4:57 pm

    Case matters for Java Bean properties. In EL you try to access property username, but in bean you have getUserName/setUserName. Use getUsername/setUsername (lowercase ‘n’) instead.

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

Sidebar

Related Questions

Having a very annoying problem with passing data between activities. This is the code
Hoping that someone can help clear up this very annoying situation I find myself
So I am using the Facebook iOS SDK and I get this very annoying
Maven Jetty plugin is very nice (I'm using version 6.1.26). The only annoying thing
JQuery events are annoying me. The thing is that I very often use javascript
Alright, so this is getting very very annoying. I have an unmanaged VC 2010
I don't think this is possible, but if it is, I'd find it very
I now use the new Visual Studio 2010 and I experience something very annoying
I'm experiencing a very strange (and annoying) linker error on my project. Say for
This is a very annoying artifact I am noticing of WPF and I was

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.