KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > springframework > samples > countries > web > ErrorsController


1 package org.springframework.samples.countries.web;
2
3 import javax.servlet.ServletException JavaDoc;
4 import javax.servlet.http.HttpServletRequest JavaDoc;
5 import javax.servlet.http.HttpServletResponse JavaDoc;
6
7 import org.springframework.web.servlet.ModelAndView;
8 import org.springframework.web.servlet.mvc.multiaction.MultiActionController;
9
10 /**
11  * @author Jean-Pierre Pawlak
12  */

13 public class ErrorsController extends MultiActionController {
14     // handlers
15

16     /**
17      * Custom handler for http404
18      * @param request current HTTP request
19      * @param response current HTTP response
20      * @return a ModelAndView to render the response
21      */

22     public ModelAndView handleHttp404(HttpServletRequest JavaDoc request, HttpServletResponse JavaDoc response) throws ServletException JavaDoc {
23         return new ModelAndView("errorHttp404View");
24     }
25
26 }
27
Popular Tags