开发者

Set attribute into JSP PageContext for use in EL from a Filter

开发者 https://www.devze.com 2022-12-20 07:21 出处:网络
How can I put an attribute开发者_JS百科 into the JSP PageContext for the current request (so that it becomes accessible via ${myVar} ) from a Filter that runs before the JSP?I think I may be missing s

How can I put an attribute开发者_JS百科 into the JSP PageContext for the current request (so that it becomes accessible via ${myVar} ) from a Filter that runs before the JSP?


I think I may be missing something, but:

  • you have the ServletRequest object in the filter
  • call request.setAttribute("myVar", value);
  • call chain.doFilter(request, response);
0

精彩评论

暂无评论...
验证码 换一张
取 消