Set attribute in JSP PageContext for use in EL from filter

How can I put an attribute in the JSP PageContext for the current request (so that it becomes available through ${myVar}) from the filter that runs before the JSP?

+3
source share
1 answer

I think I can miss something, but:

  • you have an object ServletRequestin the filter
  • call request.setAttribute("myVar", value);
  • call chain.doFilter(request, response);
+4
source

Source: https://habr.com/ru/post/1732294/


All Articles