JSP / Exception中的输入字段发生处理jsp页面

时间:2013-05-28 03:13:22

标签: jsp exception spring-mvc

当尝试在jsp页面上创建输入字段时,我收到错误:exception occurred processing jsp page。表单开始时出现错误。我不确定是什么问题。我在下面的jsp文件中附加了代码,可以通过单击下面的代码链接看到。如果看不到,请告诉我。谢谢!

Code

@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";
}

0 个答案:

没有答案