1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 package org.apache.struts.tiles;
23
24 import java.io.IOException;
25
26 import javax.servlet.ServletContext;
27 import javax.servlet.ServletException;
28 import javax.servlet.http.HttpServletRequest;
29 import javax.servlet.http.HttpServletResponse;
30
31 /**
32 * Basic implementation of Controller. Implementations can extend this class
33 * to insulate themselves from changes in the <code>Controller</code>
34 * interface.
35 */
36 public class ControllerSupport implements Controller {
37
38 /**
39 * Method associated to a tile and called immediately before tile is
40 * included. This implementation does nothing.
41 *
42 * @param tileContext Current tile context.
43 * @param request Current request
44 * @param response Current response
45 * @param servletContext Current servlet context
46 * @deprecated Use execute() instead. This will be removed after
47 * Struts 1.2.
48 */
49 public void perform(
50 ComponentContext tileContext,
51 HttpServletRequest request,
52 HttpServletResponse response,
53 ServletContext servletContext)
54 throws ServletException, IOException {
55 }
56
57 /**
58 * @see org.apache.struts.tiles.Controller#execute(org.apache.struts.tiles.ComponentContext, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, javax.servlet.ServletContext)
59 */
60 public void execute(
61 ComponentContext tileContext,
62 HttpServletRequest request,
63 HttpServletResponse response,
64 ServletContext servletContext)
65 throws Exception {
66
67 perform(tileContext, request, response, servletContext);
68 }
69 }