KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > example > ExampleController


1 /*
2  * Spring framework demo
3  */

4  
5 package example;
6
7 import java.io.IOException;
8
9 import javax.servlet.ServletException;
10 import javax.servlet.http.HttpServletRequest;
11 import javax.servlet.http.HttpServletResponse;
12
13 import org.springframework.web.servlet.ModelAndView;
14 import org.springframework.web.servlet.mvc.Controller;
15
16 /**
17  * @author Juergen Hoeller
18  * @author Rod Johnson
19  */

20 public class ExampleController implements Controller {
21
22     /**
23      * @see org.springframework.web.servlet.mvc.Controller#handleRequest(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
24      */

25     public ModelAndView handleRequest(
26         HttpServletRequest request,
27         HttpServletResponse response)
28         throws ServletException, IOException {
29         
30         return new ModelAndView("/test.jsp");
31     }
32
33 }
34
Popular Tags