1 package org.tigris.scarab.actions; 2 3 48 49 import org.apache.turbine.TemplateContext; 51 import org.apache.turbine.RunData; 52 53 import org.tigris.scarab.om.ScarabUser; 55 import org.tigris.scarab.util.ScarabConstants; 56 import org.tigris.scarab.actions.base.RequireLoginFirstAction; 57 58 65 public class Redirect extends RequireLoginFirstAction 66 { 67 71 public void doRedirect(RunData data, TemplateContext context) 72 throws Exception 73 { 74 String nextTemplate = data.getParameters() 76 .getString(ScarabConstants.NEXT_TEMPLATE, 77 ((ScarabUser)data.getUser()).getHomePage()); 78 79 setTarget(data, nextTemplate); 80 } 81 82 85 public void doPerform(RunData data, TemplateContext context) 86 throws Exception 87 { 88 doRedirect(data, context); 89 } 90 } 91 | Popular Tags |