SyntaxFix
Write A Post
Hire A Developer
Questions
Use
request.setAttribute("attributeName");
and then
getServletContext().getRequestDispatcher("/file.jsp").forward();
Then it will be accessible in the JSP.
As a side note - in your jsp avoid using java code. Use JSTL.