I'm trying to send a parameter from a servlet to a jsp file. This is the servlet:
public class HomepageController extends HttpServlet {
private static final long serialVersionUID = 1L;
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
CategoryService cs = new CategoryService();
request.setAttribute("attribute", "Hello world!");
request.getRequestDispatcher("/views/homepage.jsp").forward(request,response);
}
}
and in the jsp I try to access it like this ${attribute} but it doesn't work. It shows as if it is not defined.