Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/spring/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Spring Internet Explorer 8重定向问题_Spring_Internet Explorer - Fatal编程技术网

Spring Internet Explorer 8重定向问题

Spring Internet Explorer 8重定向问题,spring,internet-explorer,Spring,Internet Explorer,我制作了一个JSP页面,它将请求发送到@controller方法UserList()中,并使用Jquery AJAX显示数据。我已将分页概念应用于此,单击超链接“NEXT”和“PREVIOUS”,我将请求发送到控制器中的方法NEXT(),该方法在每个请求上增加或减少页面大小,并重定向回userList(),以获取当前增加/减少页面值之后的数据 @RequestMapping(method = RequestMethod.GET, value = "next") public String nex

我制作了一个JSP页面,它将请求发送到@controller方法UserList()中,并使用Jquery AJAX显示数据。我已将分页概念应用于此,单击超链接“NEXT”和“PREVIOUS”,我将请求发送到控制器中的方法NEXT(),该方法在每个请求上增加或减少页面大小,并重定向回userList(),以获取当前增加/减少页面值之后的数据

@RequestMapping(method = RequestMethod.GET, value = "next")
public String next(HttpServletRequest request) throws Exception {
       ++userListPage;
       return "redirect:/admin/userList";
}

@RequestMapping(value = "userList")
public String userList(HttpServletRequest request, Model model) throws Exception {

    data is retrived over here and response is send back to JSP
}
这在chrome、firefox中运行良好,但在InternetExplorer8中不起作用。 当我第一次点击JSP上的“下一步”时,Next()重定向到USELList(),但在第二次之后,我点击Next(),将重定向到UsRistLee()方法,而不是考虑它返回“重定向:/admin /UsLIST”;as视图名称和视图已解析。 我试了很多,但都不管用。请帮帮我。 感谢您的支持。

试试这个

return "forward:/admin/userList";

因为IE8向客户端发送请求,而这次客户端不向服务器发送请求。因此,它不适用于美国。

我遇到了一个类似的问题,我通过POST请求从浏览器提交了一份表格。在配置为处理POST的控制器方法中,在执行必要的处理后,我试图重定向到另一个控制器方法(配置为GET)。它在Firefox和Chrome中起作用,但在IE中不起作用。即使将第一个控制器的返回视图从重定向更改为转发,它在IE中似乎也不起作用。问题是转发在本例中使用了与IE POST相同的请求方法作用域,因此,我必须删除在第二个控制器方法上指定的请求方法GET,以使其工作。

我认为您的解释不正确。但还是要谢谢你的回答,这对我很有效。