1
2
3
4
5
6 package org.repoweb.action;
7 import javax.servlet.http.HttpServletRequest;
8 import javax.servlet.http.HttpServletResponse;
9 import org.apache.struts.action.Action;
10 import org.apache.struts.action.ActionForm;
11 import org.apache.struts.action.ActionForward;
12 import org.apache.struts.action.ActionMapping;
13 import org.repoweb.model.UnknownGroupIdException;
14 /***
15 * Dispatch control flow accordingly to a parametrized Id.
16 */
17 public class DispatchAction extends Action {
18 public ActionForward execute(ActionMapping mapping, ActionForm objForm,
19 HttpServletRequest request, HttpServletResponse res)
20 throws UnknownGroupIdException {
21 String parameter = mapping.getParameter();
22 return mapping.findForward(request.getParameter(parameter));
23 }
24 }