Topic: LookupDispatchAction - Request does not contain handler parameter name
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   hal_arres
Posted On:   Friday, October 29, 2004 07:54 AM

Hi, I am new to Struts and I want to use them to design a form-wizard. I use LookupDispatchAction to realize it and begin with a dummy implementation. But I got the following exception: MESSAGE Request[/searchResult] does not contain handler parameter named method DESCRIPTION The request sent by the client was syntactically incorrect (Request[/searchResult] does not contain handler parameter named method). I think this code-parts are important: code: web.xml action *.do struts-config.xml name="searchForm" scope="session"    More>>

Hi,

I am new to Struts and I want to use them to design a form-wizard. I use LookupDispatchAction to realize it and begin with a dummy implementation.

But I got the following exception:

MESSAGE Request[/searchResult] does not contain handler parameter named method

DESCRIPTION The request sent by the client was syntactically incorrect (Request[/searchResult] does not contain handler parameter named method).


I think this code-parts are important:

code:


web.xml


action
*.do



struts-config.xml



name="searchForm"
scope="session"
input="/jsp/search/Search.jsp"
parameter="method">

path="/jsp/search/Search.jsp"/>

path="/jsp/result/SearchResult.jsp"/>




type="de.wizard.control.SearchResultLookupDispatchAction"
name="searchForm"
scope="session"
input="/jsp/result/SearchResult.jsp"
parameter="method">

path="/jsp/search/Search.jsp"/>

path="/jsp/search/Search.jsp"/>

path="/jsp/subscription/ServiceSubscription.jsp"/>




type="de.wizard.subscription.control.ServiceSubscriptionLookupDispatchActionu"
name="searchForm"
scope="session"
input="/jsp/subscription/ServiceSubscription.jsp"
parameter="method">

path="/jsp/result/SearchResult.jsp"/>

path="/jsp/search/Search.jsp"/>

path="/jsp/information/CustomerInformation.jsp"/>



One JSP-File:
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean"%>
<%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html"%>




Form 2 - Anzeige der Ergebnisse




Form 2






SearchResult.jsp (Anzeige der Ergebnisse)















One LookupDispatchAction-Class:

public class SearchResultLookupDispatchAction extends LookupDispatchAction {

protected Map getKeyMethodMap() {
HashMap map = new HashMap();
map.put("button.back", "back");
map.put("button.forward", "forward");
map.put("button.reset", "reset");
return map;
}

public ActionForward back(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
//do something
return (mapping.findForward("back"));
}

public ActionForward forward(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
//do something
return (mapping.findForward("forward"));
}

public ActionForward reset(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
//do something
return (mapping.findForward("reset"));
}}




I can use the function "forward" to go through the forms, but I can't use "reset" and "back".
Always when I push the button "back" or "reset" I got the Exception I worte above.

Thanks in advance
hal arres    <<Less
About | Sitemap | Contact