response.sendRedirect("login.jsp");
} else {
PostsModel model = new PostsModel();
if (request.getMethod().equals("POST")) {
model.insertarPost(new Post(request.getParameter("texto")));
}
request.setAttribute("posts", model.obtenerPosts());
request.getRequestDispatcher("/WEB-INF/vistas/posts.jsp").forward(request, response);
}
}