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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T21:23:51+00:00 2026-05-22T21:23:51+00:00

My JSP gives an error showing that it is not able to find a

  • 0

My JSP gives an error showing that it is not able to find a property in a DTO and yet in the DTO the property is really there. Below is the error:

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

    exception

    org.apache.jasper.JasperException: An exception occurred processing JSP page /addPos.jsp at line 101

    98:                         
    99:                             --%>
    100: 
    101:                             ${dt.date}
    102: 
    103:                         
    104:                         

    Stacktrace:
        org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:505)
        org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:416)
        org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)

    root cause

    javax.el.PropertyNotFoundException: Property 'date' not found on type p1.dateDto
        javax.el.BeanELResolver$BeanProperties.get(BeanELResolver.java:193)
        javax.el.BeanELResolver$BeanProperties.access$400(BeanELResolver.java:170)
        javax.el.BeanELResolver.property(BeanELResolver.java:279)
        javax.el.BeanELResolver.getValue(BeanELResolver.java:60)
        javax.el.CompositeELResolver.getValue(CompositeELResolver.java:54)
        org.apache.el.parser.AstValue.getValue(AstValue.java:118)
        org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
        org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:935)
        org.apache.jsp.addPos_jsp._jspx_meth_c_005fforEach_005f0(addPos_jsp.java:227)
        org.apache.jsp.addPos_jsp._jspService(addPos_jsp.java:168)
        org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
        org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)

Here is the dateDto class:

package p1;
import java.sql.Date;

/**
 *
 * @author kk
 */
 public class dateDto
 {
     private Date date;

     public dateDto()
     {
     }

     public dateDto(Date date)
    {
         this.date =date;
     }


    public Date getDateDto()
     {
         return this.date ;
     }
 }

Below is the dateDao:

package p1;

/**
 *
 * @author kk
 */
import java.sql.*;
import java.util.*;

public class dateDao {

    private List<dateDto> dateList;
    private String dbUrl = "jdbc:mysql://localhost/mvs_db";
    private String dbDriver = "com.mysql.jdbc.Driver";
    private String dbUser = "root";
    private String dbPwd = "";

    public dateDao() {
    }

    public List<dateDto> getDateList() {
        dateList = new ArrayList<dateDto>();
        Connection con = null;
        Statement stmt = null;
        ResultSet rs = null;

        try {//trying to load the database driver and establish a connection to the database
            Class.forName(dbDriver);//loading the database driver
            con = DriverManager.getConnection(dbUrl, dbUser, dbPwd);//establishing a connection to the database
            //pw.println("connection established");//output if connection is established
        } catch (Exception e) {
            e.printStackTrace();//printing the exception error trace
        }

        try {

            stmt = con.createStatement();
            rs = stmt.executeQuery("Select vote_date from voting_date");

            while (rs.next()) {
                java.sql.Date date = rs.getDate("vote_date");
                dateDto s = new dateDto(date);
                dateList.add(s);
            }

        } catch (Exception e) {
            System.out.println(e);
        } finally {
            try {
                if (con != null) {
                    con.close();
                }
            } catch (Exception e) {
                e.printStackTrace();
            }
        }

        return dateList;
    }
}

I’m actually retrieving Date type values from a mysql database and displying in a dropdown list.

The JSP code is below:

    <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<jsp:useBean id="dtb" scope="session" class="p1.dateDao"/>
<%--
    Document   : addCamp
    Created on : May 20, 2011, 11:28:31 AM
    Author     : ken
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <style type="text/css">
            body {
                background-color:#AFC7C7;
                padding: 0;
                margin: 0;
            }
            div.wrapper {
                margin-left: 10%;
                margin-right: 10%;
                background-color:#6D7B8D;
                height: 607px;
                padding-top:0px;
                border: thin solid #000000;
            }

            div#image{
                padding-top:1%;
                padding-bottom:1%;
            }
            div#adminlogin{
                width:35%;
                height:40%;
                background-color:#AFC7C7;
                border-width:thin;
                border-style:solid;
                border-color:#000000;
                margin: 0 auto;
                text-align:left;
                overflow: hidden;
                padding: 5px;
            }

            hr {
                height:1px;
                color:#000000;
                background-color:#000000;
                width:99%;
                margin-left: 0 ;
                margin-right: auto ;
                border-style:solid;
            }

            .inputtext {
                width: 200px;
                height: 30px;
                Font-Family:Arial;
                Font-Size:18px
            }

        </style>

        <script language="javascript" type="text/javascript">
            function clearText(field){

                if (field.defaultValue == field.value) field.value = '';
                else if (field.value == '') field.value = field.defaultValue;

            }

        </script>
    </head>
    <body>
        <div class="wrapper">
            <div id="image">
                <p>
                    <img src="${pageContext.request.contextPath}/images/logo.gif"
                         alt="banner"
                         width=100%
                         height="100"
                         /></p>
            </div><!--end of image div-->
            <div id=adminlogin >
                <p style="text-align:center">Adding Voting Position</p>
                <hr/>
                <form method=POST id="pos" action="${pageContext.request.contextPath}/getPos">
                    <p/>
                    <%--The textfield for hostel name--%>
                    <label>Position<input type="text" id="pos"  name="position" value="" class="inputtext"
                                             onFocus="clearText(this)" onBlur="clearText(this)"/></label><br/>
                    <br/>
                    <label>Voting Date <select name="dates" size="1" id="pos" class="inputtext"
                                               onFocus="clearText(this)" onBlur="clearText(this)">
                        <c:forEach items="${dtb.dateList}" var="dt">
                            <%--<option value="1"><c:out value="${cam.campnm}"/></option>--%>

                            <option>${dt.date}</option>

                        </c:forEach>
                        </select></label>
                        <br/>
                        <br/>
                    <input type="submit" value="Add" style="font-size:14pt; margin-left: 158px; height: 30px;"/>

                </form>
                <p STYLE="color : #E41B17;">${message}</p>
                <c:remove var="message" scope="session" />



            </div><%--end of admin login div--%>
            <p style="text-align: center"><a href=adminHome.jsp>Home</a> <a href=index.jsp>Logout</a></p>
        </div>
    </body>
</html>

what could be the problem?

  • 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-22T21:23:51+00:00Added an answer on May 22, 2026 at 9:23 pm

    You missed standard setter/getter in dateDto

    Make it

    public class dateDto
     {
         private Date date;
    
         public dateDto()
         {
         }
    
         public dateDto(Date date)
         {
             this.date =date;
         }
    
    
        public Date getDate()
         {
             return this.date ;
         }
    
         public Date setDate(Date d)
         {
              this.date  = d;
         }
     }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

What would make a JSP not finish running and not throw an error? I
In JSP, I notice that I can't render ${} into HTML. After the page
Below am posting my jsp page. home.jsp <%@taglib uri=/WEB-INF/struts-bean.tld prefix=bean%> <%@taglib uri=/WEB-INF/struts-html.tld prefix=html %>
On my JSP page, I defined some javascript with a variable that get value
I have a JSP page where there is a row of buttons in their
I have a jsp that contains a table with some information from db. I
home.jsp <jsp:useBean id=username class=java.lang.String scope=application/> <% username=Jitendra; %> <jsp:include page=include.jsp/> include.jsp <%=username%> This gives
I have a short jsp page that tries to establish the connection to the
I'm creating a site on which there are many page components that refer to
I'm trying to send plain text error messages from a tomcat servlet, so that

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.