View Javadoc

1   /*
2    * Created on 2004/09/26
3    */
4   package org.ieee.shinobu.demo.velocity.shankar;
5   
6   import javax.servlet.http.HttpServletRequest;
7   import javax.servlet.http.HttpServletResponse;
8   
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  
14  /***
15   * @author shinobu
16   */
17  public class DynamicAction extends Action {
18  
19  	/* (non-Javadoc)
20  	 * @see org.apache.struts.action.Action#execute(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
21  	 */
22  	public ActionForward execute(ActionMapping mapping, ActionForm form,
23  			HttpServletRequest request, HttpServletResponse response) throws Exception {
24  		DynamicActionForm myForm = (DynamicActionForm) form;
25  		System.out.println("myForm.searchCriteria:"+myForm.getValue("searchCriteria"));
26  		System.out.println("myForm.searchType:"+myForm.getValue("searchType"));
27  		return mapping.findForward("search");
28  	}
29  	
30  }