You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by fea jabi <zy...@hotmail.com> on 2006/10/27 15:34:13 UTC

On enter from input field getting: does not contain handler parameter error

        <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: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: On enter from input field getting: does not contain handler parameter error

Posted by fea jabi <zy...@hotmail.com>.
Here is the solution for this.

http://frustratedprogrammer.blogspot.com/2004/07/ie-bug-and-struts-forms-with-one-input.html

Thanks.


>From: "fea jabi" <zy...@hotmail.com>
>Reply-To: "Struts Users Mailing List" <us...@struts.apache.org>
>To: user@struts.apache.org
>Subject: On enter from input field getting: does not contain handler 
>parameter error
>Date: Fri, 27 Oct 2006 09:34:13 -0400
>
>        <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 'method'.  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: user-unsubscribe@struts.apache.org
>For additional commands, e-mail: user-help@struts.apache.org
>

_________________________________________________________________
Try the next generation of search with Windows Live Search today!  
http://imagine-windowslive.com/minisites/searchlaunch/?locale=en-us&source=hmtagline


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org