2
* $Header: /home/cvs/jakarta-struts/contrib/scaffold/src/java/org/apache/struts/scaffold/RelayAction.java,v 1.4 2004/03/14 07:15:03 sraeburn Exp $
4
* $Date: 2004/03/14 07:15:03 $
6
* Copyright 2001-2004 The Apache Software Foundation.
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
12
* http://www.apache.org/licenses/LICENSE-2.0
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.
22
package org.apache.struts.scaffold;
24
import javax.servlet.http.HttpServletRequest;
25
import javax.servlet.http.HttpServletResponse;
27
import org.apache.struts.action.ActionForm;
28
import org.apache.struts.action.ActionForward;
29
import org.apache.struts.action.ActionMapping;
31
import org.apache.commons.scaffold.lang.Tokens;
35
* Standard Action to forward control to another mapping
36
* given as a runtime parameter (?dispatch=).
38
* This class extends BaseAction to provide
39
* cross-compatibility with Struts 1.1 and 1.0
41
* @version $Revision: 1.4 $ $Date: 2004/03/14 07:15:03 $
43
public final class RelayAction extends BaseAction {
46
* Looks for a runtime parameter named "dispatch",
47
* and uses its value to search for an ActionForward.
49
* <code>dispatch=findByTile</code> will return
50
* the ActionForward named "findByTitle".
52
* @param mapping The ActionMapping used to select this instance
53
* @param form The optional ActionForm bean for this request (if any)
54
* @param request The HTTP request we are processing
55
* @param response The response we are creating
57
protected ActionForward findSuccess(
58
ActionMapping mapping,
60
HttpServletRequest request,
61
HttpServletResponse response) {
63
return mapping.findForward(request.getParameter(Tokens.DISPATCH));
b'\\ No newline at end of file'