getting org.springframework.web.bind.MissingServletRequestParameterException
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am using spring annotations I have written one method public ModelAndView showTestPage(@RequestParam("firstInstanceId") String id1, @RequestParam("secondInstanceId") String id2, HttpSession session) { ModelAndView mv = new ModelAndView("showCompareItemList"); mv.addObject("pageTitle", "showCompareItemList"); mv.addObject("firstInstanceId", id1); mv.addObject("secondInstanceId", id2); return mv; } when there both values of id1 and id2 are present it works fine but when there is only one value i get exception org.springframework.web.bind