开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜