SearchAction.java
01 package com.bea.medrec.actions;
02 
03 import com.bea.medrec.utils.ClientException;
04 import com.bea.medrec.utils.MedRecLog4jFactory;
05 import javax.servlet.http.HttpServletRequest;
06 import javax.servlet.http.HttpServletResponse;
07 import org.apache.log4j.Logger;
08 import org.apache.struts.action.ActionForm;
09 import org.apache.struts.action.ActionForward;
10 import org.apache.struts.action.ActionMapping;
11 
12 /**
13  <p>Search controller.  Handles all search requests.</p>
14  *
15  @author Copyright (c) 2006 by BEA Systems. All Rights Reserved.
16  */
17 public class SearchAction extends PhysBaseAction {
18   private static Logger logger =
19       MedRecLog4jFactory.getLogger(SearchAction.class.getName());
20 
21  /**
22   <p>Process the specified HTTP request, and create the corresponding HTTP
23   * response (or forward to another web component that will create it).
24   * Return an <code>ActionForward</code> instance describing where and how
25   * control should be forwarded.
26   <br>
27   * Redirects to the search view.
28   </p>
29   *
30   @param mapping  The ActionMapping used to select this instance
31   @param form  The optional ActionForm bean for this request (if any)
32   @param request  The HTTP request we are processing
33   @param response  The HTTP response we are creating
34   */
35   public ActionForward executeAction(ActionMapping mapping,
36                                      ActionForm form,
37                                      HttpServletRequest request,
38                                      HttpServletResponse response)
39     throws ClientException, Exception
40   {
41     // Minimal check for valid session.
42     //super.checkSession(request, mapping);
43 
44     String nextPage = "search.home";
45 
46     logger.debug("Redirecting to "+nextPage);
47     return mapping.findForward(nextPage);
48   }
49 }