Cannot solve the problem javax.el.PropertyNotFoundException: Property [content] not found on type [java.lang.String]

I've read the same problem solutions, but it didn't helped me. there is a part of my Bean class with good written getter:

@Table(name = "notes")
public class Note {
    @GeneratedValue (strategy = GenerationType.IDENTITY)
    @Column (name = "id")
    private int id;    
    @Column (name = "content")
    private String content;

    public Note() {

    public Note(String title, String content, GregorianCalendar date, boolean done) {
        this.title = title;
        this.content = content; = date;
        this.done = done;

    public int getId() {
        return id;

    public void setId(int id) { = id;

    public String getContent() {
        return content;

    public void setContent(String content) {
        this.content = content;

Using debug mode i can see, that i've got my ArrayList of notes from dataBase. It means, that connection is good. there is a code from servlet:

public static final String OUTPUT_LIST = "List For Pager";

// other code, not nessesary for showing  

protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
            Integer pageNumber =  (Integer) req.getAttribute(PAGE_NUMBER);
            if(pageNumber==null) pageNumber = 1;
            ArrayList<Note> result = new ArrayList<Note>();
            ArrayList<Note> notes = DaoDriver.getActualNotesHandler().getNotesList();
            //iteration method for filling result
            RequestDispatcher requestDispatcher = req.getRequestDispatcher("/index_test.jsp");

There is a place, where i call my list from jsp:

<c:forEach var="note" items="${MainServlet.OUTPUT_LIST}">

      <div class="row" padding="5" >
        <div class="card-deck">
          <div class="card">
            <div class="card-header">Title1</div>
            <div class="card-body"><p>${note.content}</p></div>
            <div class="card-footer">
              <input type="checkbox" class="Done">
              <button>Edit Note</button>


i have additional problem here, that can crash my application. I have the same situation, like in this question: JPA Cannot resolve column/IntelliJ

but i have my data associated and quick fix doesn't resolve this problem.

what is wrong with my code?

1 answer

  • answered 2018-09-24 03:22 huy

    Try changing ${MainServlet.OUTPUT_LIST} to ${requestScope.OUTPUT_LIST}

    <c:forEach var="note" items="${requestScope.OUTPUT_LIST}">