【发布时间】:2016-01-16 13:36:05
【问题描述】:
我有以下代码:
RequestDispatcher dispatcher = request.getRequestDispatcher(viewName);
// while viewName is another servlet name;
dispatcher.forward(request, response);
除了参数显示在浏览器地址栏外,这是一个成功的转发。像这样的:
http://localhost:8080/testweb/action/LoginAction/login?username=apcpros%40163.com&password=12234
我不想在转发后在浏览器地址栏中显示任何参数(例如 username 和 password)。 我该怎么办?
【问题讨论】:
-
你能解决这个问题吗?
-
我犯了一个小错误。我在jsp中使用了GET方法。
标签: java forward requestdispatcher