Getting blank page JSP load
<p>I'm having a problem that when my JSP loads, it returns a blank page. The page is supposed to call the Controller with the parameter "btnListar" and call de DAO to list entries from the database. I debugged the code (I'm using NetBeans to build this app), and the values are being passed correctly, the variables are filled with entries from the DB that the DAO gets, but the page the browser is supposed to show just doesn't appear, it's blank. </p>

<p>My Controller:</p>

<pre><code>public class ExperienciaControle extends HttpServlet {

    protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        try {
            String action = request.getParameter("action");
            switch (action) {
                case "btnCadastrar": {
                    Experiencia exp = new Experiencia();
                    exp.setEmpresa(request.getParameter("txtEmpresa"));
                    exp.setCargo(request.getParameter("txtCargo"));
                    exp.setData(request.getParameter("txtData"));
                    exp.setAtribuicoes(request.getParameter("txtAtrib"));
                    ExperienciaDAO dao = new ExperienciaDAO();
                    dao.insertExp(exp);
                    break;
                }
                case "btnAtualizar": {
                    Experiencia exp = new Experiencia();
                    exp.setEmpresa(request.getParameter("txtEmpresa"));
                    exp.setCargo(request.getParameter("txtCargo"));
                    exp.setData(request.getParameter("txtData"));
                    exp.setAtribuicoes(request.getParameter("txtAtrib"));
                    ExperienciaDAO dao = new ExperienciaDAO();
                    dao.updateExp(exp);
                    break;
                }
                case "btnRemover": {
                    Experiencia exp = new Experiencia();
                    exp.setId(Integer.parseInt(request.getParameter("chckId")));
                    ExperienciaDAO dao = new ExperienciaDAO();
                    dao.deleteExp(exp);
                    break;
                }
                case "btnListar": {
                    ExperienciaDAO dao = new ExperienciaDAO();
                    ArrayList&lt;Experiencia&gt; expArray = dao.selectExp();
                    request.setAttribute("expArray", expArray);
                    break;
                }
                default:
                    break;
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }

    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        processRequest(request, response);
    }

    @Override
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        processRequest(request, response);
    }

    @Override
    public String getServletInfo() {
        return "Short description";
    }
}
</code></pre>

<p>My JSP:</p>

<pre><code>&lt;%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%&gt;
&lt;%@ page import="java.util.*" %&gt;
&lt;%@ page import="Modelo.*" %&gt;
&lt;!DOCTYPE html&gt;
&lt;html&gt;
    &lt;head&gt;
        &lt;script src="../js/dropdown.js"&gt;&lt;/script&gt;
        &lt;script src="../js/jquery-1.12.3.min.js"&gt;&lt;/script&gt;
        &lt;script src="../js/lista.js"&gt;&lt;/script&gt;
        &lt;link type="text/css" rel="stylesheet" href="../css/bootstrap.css" /&gt;
        &lt;link type="text/css" rel="stylesheet" href="../css/admin.css" /&gt;
        &lt;link type="text/css" rel="stylesheet" href="../css/dropdown.css" /&gt;
        &lt;link type="text/css" rel="stylesheet" href="../css/body.css" /&gt;
        &lt;link type="text/css" rel="stylesheet" href="../css/main.css" /&gt;
        &lt;link type="text/css" rel="stylesheet" href="../css/fonts.css" /&gt;  
        &lt;title&gt;Currículo | Administração&lt;/title&gt;
    &lt;/head&gt;
    &lt;body&gt;
        &lt;div class="body"&gt;
            &lt;div&gt;
                &lt;nav id="primary_nav_wrap"&gt;
                    &lt;ul&gt;
                        &lt;li class="current-menu-item"&gt;&lt;a href="../"&gt;Home&lt;/a&gt;&lt;/li&gt;
                        &lt;li&gt;&lt;a&gt;Experiência&lt;/a&gt;
                            &lt;ul&gt;
                                &lt;li&gt;&lt;a href="javascript:toggleDiv('divAddExp');"&gt;Adicionar&lt;/a&gt;&lt;/li&gt;
                                &lt;li&gt;&lt;a href="javascript:toggleDiv('divUpdExp');"&gt;Listar&lt;/a&gt;&lt;/li&gt;
                            &lt;/ul&gt;
                        &lt;/li&gt;
                        &lt;li&gt;&lt;a&gt;Educação&lt;/a&gt;
                            &lt;ul&gt;
                                &lt;li&gt;&lt;a href="#"&gt;Adicionar&lt;/a&gt;&lt;/li&gt;
                                &lt;li&gt;&lt;a href="#"&gt;Atualizar&lt;/a&gt;&lt;/li&gt;
                                &lt;li&gt;&lt;a href="#"&gt;Remover&lt;/a&gt;&lt;/li&gt;
                            &lt;/ul&gt;
                        &lt;/li&gt;
                        &lt;li&gt;&lt;a&gt;Habilidade&lt;/a&gt;
                            &lt;ul&gt;
                                &lt;li&gt;&lt;a href="#"&gt;Adicionar&lt;/a&gt;&lt;/li&gt;
                                &lt;li&gt;&lt;a href="#"&gt;Atualizar&lt;/a&gt;&lt;/li&gt;
                                &lt;li&gt;&lt;a href="#"&gt;Remover&lt;/a&gt;&lt;/li&gt;
                            &lt;/ul&gt;
                        &lt;/li&gt;
                    &lt;/ul&gt;
                &lt;/nav&gt;
            &lt;/div&gt;
            &lt;div id="divAddExp" style="display:none" class="cadastros"&gt;
                &lt;form name="frmExp" action="../ExperienciaControle" method="POST"&gt;
                    &lt;h1 style="font-family: Roboto"&gt;Cadastro de Experiência&lt;/h1&gt;&lt;br /&gt;
                    &lt;label for="lblEmpresa"&gt;Empresa &lt;/label&gt;&lt;input type="text" name="txtEmpresa" class="form-control" /&gt;&lt;br /&gt;
                    &lt;label for="lblCargo"&gt;Cargo &lt;/label&gt;&lt;input type="text" name="txtCargo" class="form-control" /&gt;&lt;br /&gt;
                    &lt;label for="lblData"&gt;Data &lt;/label&gt;&lt;input type="text" name="txtData" class="form-control" /&gt;&lt;br /&gt;
                    &lt;label for="lblAtrib"&gt;Atribuições &lt;/label&gt;&lt;textarea rows="4" cols="50" name="txtAtrib" class="form-control"&gt;&lt;/textarea&gt;&lt;br /&gt;
                    &lt;input class="btn" type="submit" name="btnCadastrar" value="Cadastrar" /&gt;
                &lt;/form&gt;
            &lt;/div&gt;
            &lt;div id="divUpdExp" class="cadastros"&gt;
                &lt;form name="frmExp" action="/ExperienciaControle" method="GET"&gt;
                    &lt;h1 style="font-family: Roboto"&gt;Listagem de Experiência&lt;/h1&gt;&lt;br /&gt;
                    &lt;table&gt;
                        &lt;thead&gt;
                            &lt;tr&gt;
                                &lt;th&gt;&amp;nbsp;&lt;/th&gt;
                                &lt;th&gt;ID&lt;/th&gt;
                                &lt;th&gt;Empresa&lt;/th&gt;
                                &lt;th&gt;Cargo&lt;/th&gt;
                            &lt;/tr&gt;
                        &lt;/thead&gt;
                        &lt;%
                            request.getRequestDispatcher("/ExperienciaControle?action=btnListar").forward(request, response);
                            ArrayList&lt;Experiencia&gt; expArray = (ArrayList&lt;Experiencia&gt;) request.getAttribute("expArray");
                            for (Experiencia exp : expArray) {
                        %&gt;
                        &lt;tr&gt;
                            &lt;td&gt;&lt;input type="checkbox" name="chckID" value="&lt;%= exp.getId()%&gt;" /&gt;&lt;/td&gt;
                            &lt;td&gt;&lt;%= exp.getId()%&gt;&lt;/td&gt;
                            &lt;td&gt;&lt;%= exp.getEmpresa()%&gt;&lt;/td&gt;
                            &lt;td&gt;&lt;%= exp.getCargo()%&gt;&lt;/td&gt;
                        &lt;/tr&gt;
                        &lt;%
                            }
                        %&gt;
                    &lt;/table&gt;
                    &lt;span&gt;&lt;input class="btn" type="submit" name="btnListar" value="Listar" /&gt;&lt;/span&gt;
                    &lt;span&gt;&lt;input class="btn" type="submit" name="btnAtualizar" value="Atualizar" /&gt;&lt;/span&gt;
                    &lt;span&gt;&lt;input class="btn" type="submit" name="btnRemover" value="Remover" /&gt;&lt;/span&gt;
                &lt;/form&gt;
            &lt;/div&gt;
        &lt;/div&gt;        
    &lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>If I remove the Java code from the JSP and turn it into a pure HTML page, it works perfectly, the page comes up without any problems. Tomcat (and Glassfish) log shows no error messages, which makes things even harder. :(</p>

<p>What am I doing wrong here? Why am I getting a blank page?</p>

<p>COMPLETE CODE: <a href="http://gitlab.creationkit.com.br/thales/Curriculum" rel="nofollow">http://gitlab.creationkit.com.br/thales/Curriculum</a></p>