尝试在 jsp 页面上创建输入字段时,出现错误:exception occurred processing jsp page
. 错误从表单开始的地方开始。我不确定出了什么问题。我在下面的 jsp 文件中附加了代码,可以通过单击下面的代码链接查看。如果它不可见,请告诉我。谢谢!
@RequestMapping("/addQuizAnswer")
public String addQuizAnswer(HashMap<String, Object> map) {
map.put("quiz", new Quiz());
System.out.println((map.get("quiz")) + "addQuiz");
return "listQuiz"; //jsp name
}
@RequestMapping(value = "/submitanswer", method = RequestMethod.POST)
public String addquizContact(@ModelAttribute("quiz")
Quiz quiz, BindingResult result,Map<String, Object> map, HttpServletRequest request) {
// String someAction(@ModelAttribute("somedata") Somedata data,
// Map<String, Object> map, HttpServletRequest request){
// map.put("somedata", data);
// map.put("age", request.getParameter("age");
// return "somepage"
memberService.addQuiz(quiz);
System.out.println(quiz + "submitanswer");
return "redirect:/check";
}
@RequestMapping("/answerList")
public String listanswers(HashMap<String, Object> map) {
System.out.println("In Here");
// Fetching values from database
map.put("answerList", memberService.listQuiz());
System.out.println(map.get("answerList") + "answerList");
return "listquiz"; //jsp name
}
@RequestMapping("/delete/{QuizAnswersId}")
public String deleteQuizAnswers(@PathVariable("QuizAnswersId")
Integer memberId) {
//memberService.removeQuizAnswers(QuizAnswersId);
return "redirect:/memberList";
}