1 /* 2 * Copyright 2003,2004 The Apache Software Foundation. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package org.apache.struts.chain.servlet; 18 19 20 import org.apache.commons.chain.Context; 21 import org.apache.struts.action.ActionForward; 22 import org.apache.struts.chain.AbstractSelectForward; 23 import org.apache.struts.config.ForwardConfig; 24 import org.apache.struts.config.ModuleConfig; 25 26 27 /** 28 * <p>Create and return a <code>ForwardConfig</code> representing the 29 * specified module-relative destination.</p> 30 * 31 * @version $Rev: 54933 $ $Date: 2004-10-16 18:04:52 +0100 (Sat, 16 Oct 2004) $ 32 */ 33 34 public class SelectForward extends AbstractSelectForward { 35 36 37 // ------------------------------------------------------- Protected Methods 38 39 40 /** 41 * <p>Create and return a <code>ForwardConfig</code> representing the 42 * specified module-relative destination.</p> 43 * 44 * @param context The context for this request 45 * @param moduleConfig The <code>ModuleConfig</code> for this request 46 * @param uri The module-relative URI to be the destination 47 */ 48 protected ForwardConfig forward(Context context, 49 ModuleConfig moduleConfig, 50 String uri) { 51 52 return (new ActionForward(null, moduleConfig.getPrefix() + uri, 53 false, true)); 54 55 } 56 57 58 }