~ubuntu-branches/ubuntu/trusty/libstruts1.2-java/trusty-proposed

« back to all changes in this revision

Viewing changes to src/share/org/apache/struts/tiles/ControllerSupport.java

  • Committer: Bazaar Package Importer
  • Author(s): Arnaud Vandyck
  • Date: 2004-11-19 15:35:25 UTC
  • Revision ID: james.westby@ubuntu.com-20041119153525-mdu08a76z4zo67xt
Tags: upstream-1.2.4
ImportĀ upstreamĀ versionĀ 1.2.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * $Header: /home/cvs/jakarta-struts/src/share/org/apache/struts/tiles/ControllerSupport.java,v 1.8 2004/03/14 06:23:43 sraeburn Exp $
 
3
 * $Revision: 1.8 $
 
4
 * $Date: 2004/03/14 06:23:43 $
 
5
 *
 
6
 * Copyright 1999-2004 The Apache Software Foundation.
 
7
 * 
 
8
 * Licensed under the Apache License, Version 2.0 (the "License");
 
9
 * you may not use this file except in compliance with the License.
 
10
 * You may obtain a copy of the License at
 
11
 * 
 
12
 *      http://www.apache.org/licenses/LICENSE-2.0
 
13
 * 
 
14
 * Unless required by applicable law or agreed to in writing, software
 
15
 * distributed under the License is distributed on an "AS IS" BASIS,
 
16
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 
17
 * See the License for the specific language governing permissions and
 
18
 * limitations under the License.
 
19
 */
 
20
 
 
21
package org.apache.struts.tiles;
 
22
 
 
23
import java.io.IOException;
 
24
 
 
25
import javax.servlet.ServletContext;
 
26
import javax.servlet.ServletException;
 
27
import javax.servlet.http.HttpServletRequest;
 
28
import javax.servlet.http.HttpServletResponse;
 
29
 
 
30
/**
 
31
 * Basic implementation of Controller.  Implementations can extend this class
 
32
 * to insulate themselves from changes in the <code>Controller</code> 
 
33
 * interface.
 
34
 */
 
35
public class ControllerSupport implements Controller {
 
36
 
 
37
        /**
 
38
         * Method associated to a tile and called immediately before tile is 
 
39
         * included. This implementation does nothing.
 
40
         * @param tileContext Current tile context.
 
41
         * @param request Current request
 
42
         * @param response Current response
 
43
         * @param servletContext Current servlet context
 
44
         */
 
45
        public void perform(
 
46
                ComponentContext tileContext,
 
47
                HttpServletRequest request,
 
48
                HttpServletResponse response,
 
49
                ServletContext servletContext)
 
50
                throws ServletException, IOException {
 
51
 
 
52
                try {
 
53
                        this.execute(tileContext, request, response, servletContext);
 
54
                } catch (Exception e) {
 
55
                        throw new ServletException(e);
 
56
                }
 
57
        }
 
58
 
 
59
        /**
 
60
         * @see org.apache.struts.tiles.Controller#execute(org.apache.struts.tiles.ComponentContext, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, javax.servlet.ServletContext)
 
61
         */
 
62
        public void execute(
 
63
                ComponentContext tileContext,
 
64
                HttpServletRequest request,
 
65
                HttpServletResponse response,
 
66
                ServletContext servletContext)
 
67
                throws Exception {
 
68
 
 
69
        }
 
70
}