配置文件<!-- ========== Action Mapping Definitions ============================== -->
    <action-mappings>
   <action    path="/search"
              type="addressbook.actions.SearchAction"
              name="searchForm"
              attribute="myForm"
              scope="request"
              input="/search.jsp">
      <forward name="success" path="/display.jsp"/>
    </action>但是我沒有看到執行strSql 數據庫代碼??
請看下面的語句?
----SearchAction  所有代碼
public final class SearchAction extends AbstActionBase { private Log log =
        LogFactory.getLog(this.getClass().getName());    public ActionForward execute(ActionMapping mapping,
 ActionForm form,
 HttpServletRequest request,
 HttpServletResponse response)
throws Exception { Locale locale = getLocale(request);
MessageResources messages = getResources(request); ActionMessages errors = new ActionMessages();
String name = ((SearchForm) form).getName();
String phone = ((SearchForm) form).getPhone();
String address=((SearchForm)form).getAddress(); if (!errors.isEmpty()) {
    saveErrors(request, errors);
    return (new ActionForward(mapping.getInput()));
} String strSql = new String("SELECT * FROM " + Constants.TABLENAME + " WHERE "); if (!name.equals(""))
strSql = strSql + "name LIKE '"+ name +"%' AND";
if (!phone.equals(""))
strSql = strSql + " phone LIKE '"+ phone +"%' AND";
if (!address.equals(""))
strSql = strSql + " address LIKE '"+ address +"%'";
else
    strSql = strSql.substring(0,strSql.length()-3);     strSql = strSql + "ORDER by ID";
    HttpSession session = request.getSession();
    if (log.isDebugEnabled()) {
log.debug("SearchAction session = " + session);
log.debug("SearchAction strSql = " + strSql); }
session.setAttribute(Constants.SQLSTMT_KEY, strSql); return (mapping.findForward(Constants.FORWARD_SUCCESS));    }
}