2
* $Header: /home/cvs/jakarta-struts/contrib/struts-el/src/exercise-taglib/org/apache/struts/webapp/exercise/DynaSetAction.java,v 1.2 2004/03/14 07:15:06 sraeburn Exp $
4
* $Date: 2004/03/14 07:15:06 $
6
* Copyright 1999-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.
21
package org.apache.struts.webapp.exercise;
23
import javax.servlet.http.HttpServletRequest;
24
import javax.servlet.http.HttpServletResponse;
25
import org.apache.struts.action.Action;
26
import org.apache.struts.action.ActionForm;
27
import org.apache.struts.action.ActionForward;
28
import org.apache.struts.action.ActionMapping;
29
import org.apache.struts.action.DynaActionForm;
31
public class DynaSetAction extends Action
33
public ActionForward execute(ActionMapping mapping,
35
HttpServletRequest request,
36
HttpServletResponse response)
39
DynaActionForm dynaActionForm = (DynaActionForm) form;
41
dynaActionForm.set("foo", "alpha");
42
dynaActionForm.set("bar", "beta");
44
return (mapping.findForward("success"));