开发者

How to get include url in Filter

In my JSP page index.jsp I have

<c:import url="/hello.jsp?name=user" />

I have a filter which is mapped to hello.jsp, how do I get the include url in this case /hello.jsp?na开发者_如何学运维me=user. If I try request.getUrl(), it gives me /index.jsp.


You can fetch it using getQueryString()


It's been sent as a request parameter. Just use ServletRequest#getParameter() to get it.

String name = request.getParameter("name"); // "user"
// ...
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜