【发布时间】:2014-09-05 21:23:14
【问题描述】:
发送重定向时,是否可以看到从我们重定向到的 servlet 传递的参数是什么?
例如:
我们从 servlet servletA 重定向
protected void doGet(final HttpServletRequest req, final HttpServletResponse resp) throws IOException, ServletException {
resp.sendRedirect(req.getContextPath()+"/foo#fooMethod:val1="+val1+"&val2="+val2);
}
那么 servlet servletB 需要做什么来获取 val1/val2/fooMethod 呢?
protected void doGet(final HttpServletRequest req, final HttpServletResponse resp) throws IOException, ServletException {
}
【问题讨论】:
标签: java servlets url-redirection http-redirect