<form-bean name="Form1" type="org.apache.struts.validator.DynaValidatorForm">
           <form-property name="searchCriteria" type="java.lang.String"/>
           <form-property name="method" type="java.lang.String"/>
       </form-bean>


       <action
           path="/PrepareSearchAction"
           type="com.PrepareSearchAction"
           name="Form1"
           scope="session"
           validate="false"
           input="/pages/Search.jsp">
<forward name="success" path="/pages/Search.jsp" redirect="false"/>
       </action>

       <action
           path="/DispatchSearchAction"
           type="com.DispatchSearchAction"
           name="Form1"
           scope="session"
           validate="true"
           input="/pages/Search.jsp"
           parameter="method">
<forward name="successSearch" path="/PrepareSearchAction.do" redirect="true"/>
       </action>


IN JSP:

<html>
        <HEAD>
                <meta http-equiv="Content-Type" content="text/html; 
charset=UTF-8">
        </HEAD>

        <BODY onLoad="document.getElementById('searchCriteriaID').focus();">
                <html:form action="DispatchSearchAction.do" method="post">
                        <fmt:setBundle var="appbundle" 
basename="MessageResources"/>

<html:text name="Form1" property="searchCriteria" styleId="searchCriteriaID"/>

<html:submit onclick="" property="method"><fmt:message key="btn.search" bundle="${appbundle}"/></html:submit>
                </html:form>
        </BODY>
</html>


When the user enters value in the input field and presses enter, getting exception

[10/27/06 9:22:19:739 EDT] 2668498 RequestProces W org.apache.struts.action.RequestProcessor Unhandled Exception thrown: class javax.servlet.ServletException [10/27/06 9:22:19:799 EDT] 2668498 WebGroup E SRVE0026E: [Servlet Error]-[Request[/DispatchSearchAction] does not contain handler parameter named &#39;method&#39;. This may be caused by whitespace in the label text.]: javax.servlet.ServletException: Request[/DispatchSearchAction] does not contain handler parameter named 'method'. This may be caused by whitespace in the label text.





Everything works fine when user clicks on the search button. But when pressed enter from input field the method is not getting the value I guess and getting this exception. Not sure why this is happenning.

In other jsp's it executes the first submit button on enter from input field. But in this jsp getting error. I am not sure what's going wrong here.

I appreciate your help.

Thanks.

_________________________________________________________________
All-in-one security and maintenance for your PC. Get a free 90-day trial! http://clk.atdmt.com/MSN/go/msnnkwlo0050000002msn/direct/01/?href=http://www.windowsonecare.com/?sc_cid=msn_hotmail


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to