Friends, I'm trying to get my jsp page days to get a value from my sent servlet. I have researched in several forums, and I have not been able to return a single value can anybody help me? Here's the snippet of code I'm using JSP
insira o código aqui protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException, ClassNotFoundException {
response.setContentType("text/html;charset=UTF-8");
try (PrintWriter out = response.getWriter()) {
incidenteDao id = new incidenteDao();
request.getSession().setAttribute("retorno", "carambola");
request.getRequestDispatcher("incidenteDetail.jsp").forward(request, response);
}
}
SERVLET
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException, ClassNotFoundException {
response.setContentType("text/html;charset=UTF-8");
try (PrintWriter out = response.getWriter()) {
incidenteDao id = new incidenteDao();
request.getSession().setAttribute("retorno", "carambola");
request.getRequestDispatcher("incidenteDetail.jsp").forward(request, response);
}
}