/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package Controllers;

import MVC.Controller;
import javax.persistence.EntityManager;

/**
 *
 * @author Glenn
 */
public class Default extends Controller
{

    @Override
    public void doRequest(String actionName, Integer id) throws Exception
    {
        
        EntityManager em = this.getServletContext().getEM();
        
        this.getRequest().setAttribute("users", em.createNamedQuery("User.findAll").getResultList());
        
        this.forward("/default.jsp");
    }

}

@@ -226,48 +226,8 @@
 ler;
-%0Aimport javax.persistence.EntityManager;
 %0A%0A/*
@@ -392,190 +392,8 @@
    %7B
-%0A        %0A        EntityManager em = this.getServletContext().getEM();%0A        %0A        this.getRequest().setAttribute(%22users%22, em.createNamedQuery(%22User.findAll%22).getResultList());%0A
     

Remove unnecessary database query in the Default controller