表单提交不能在后端使用 Spring MVC 间歇性地处理 IE [英] Form Submit Not working on IE intermittently with Spring MVC in backend
问题描述
我在jsp文件上有一个简单的表单:
I have a simple form on jsp file :
<form:form method="POST" class="my-form" id="dummyExtDelSubmitForm" name="dummyExtDELSubmitForm" action="/my-web/landingPage/showPage">
<input type="text" name="viewName" value="userRegistrationPage" >
<input type="submit" name="submitDummYForm" value="Submit" ></input>
</form:form>
在 Spring MVC 控制器上我有以下方法:
on Spring MVC Controller I have the below method :
@RequestMapping(value = "/showPage", method = RequestMethod.POST)
public ModelAndView redirectToPage(@ModelAttribute("baseUserVO") BaseUserVO baseUserVO, HttpServletRequest request,Model model) throws BrownApplicationException {
HttpSession session = request.getSession();
if (baseUserVO != null && baseUserVO.getViewName()!=null) {
return new ModelAndView("redirect:" + viewName, CommonConstants.MODEL, model);
else{
return new ModelAndView("redirect:/landingPage/home.brd", CommonConstants.MODEL, model);
}
}
问题是当我提交表单时,有时会填充 BaseUserVO 对象,而大多数时候不会.它在 Firefox 上运行良好,没有失败.我试图在 fiddler 中查看请求,在表单中向 showPage 提交请求,我看不到参数,如果 viewName 不存在,则按照逻辑,然后重定向到 landPage/home ,在稍后的重定向中我做查看 viewName 参数.
Problem is when I submit the form , the BaseUserVO object is populated sometimes and most of the time it is not. it works fine on Firefox without fail. I tried to see the request in fiddler , in the form submit request to showPage , i don't see the parameters going , as per the logic if the viewName is not present, then redierect to landingPage/home , in the later redirection I do see the viewName parameter.
BaseUserVO 的代码,它只是一个 POJO:
Code for BaseUserVO which is just a POJO :
public class BaseUserVO {
private Integer userMasterId;
private String firstname;
private String lastname;
private Integer relationshipCode;
private String relationshipName;
private String userName;
private String userDisplayName;
private String viewName;
private String wpoId;
private String userType;
public Integer getUserMasterId() {
return userMasterId;
}
... getter seetter for other attributes.
不知道是服务器端的问题还是客户端的问题,如果有线索请回复.
Not sure whether it's a problem from Server side or client, Please reply if any clue.
谢谢,拉利特
推荐答案
发现问题,它和 IE 有自动认证问题(见下面链接),虽然目前没有具体的解决方案但有一些解决方法.
Found the issue , its and IE with automatic authentication issue (see below Link), although no concrete solution so far but there are some workarounds.
这篇关于表单提交不能在后端使用 Spring MVC 间歇性地处理 IE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!