【问题标题】:Is there a way for requestdispatcher forward method show url of landing pagerequestdispatcher forward方法有没有办法显示登陆页面的url
【发布时间】:2013-11-17 09:03:14
【问题描述】:

Requestdispatcher转发方法有没有办法显示着陆页的URL

RequestDispatcher r = request.RequestDispatcher("error.jsp");
r.forward(request,response);

不显示网址error.jsp

【问题讨论】:

  • 我需要立竿见影的结果

标签: java forward requestdispatcher


【解决方案1】:

不,不是。网址不会随 forward 更改。

使用sendRedirect查看浏览器中的url变化。

response.sendRedirect("error.jsp");

【讨论】:

    猜你喜欢
    • 2022-12-05
    • 1970-01-01
    • 1970-01-01
    • 2013-06-10
    • 1970-01-01
    • 1970-01-01
    • 2016-12-16
    • 1970-01-01
    • 2021-04-03
    相关资源
    最近更新 更多