I hava already this solution, but without sucess.
------------- Segue mensagem encaminhada ------------- De: "Sanoj, Antony (IE10)" <[EMAIL PROTECTED]> Data: Mon, 12 Apr 2004 08:26:07 -0700 Para: Struts Users Mailing List <[EMAIL PROTECTED]> Assunto: RE: Problem with LookupDispatchAction and parameter operation hi, ><html:form action="mapCoordinate.html"> ><table width="750" height="50" border="0" cellpadding="0" cellspacing="0" bgcolor="#C0C0C0"> ><tr> what is action="mapCoordinate.html" ? Change it to "mapCoordinate". Regards, Sanoj Antony -----Original Message----- From: Struts Framework [mailto:[EMAIL PROTECTED] Sent: Monday, April 12, 2004 8:41 PM To: [EMAIL PROTECTED] Subject: Problem with LookupDispatchAction and parameter operation Hi, I'm using the following environment with LookupDispatchAction. struts-config.xml <form-bean name="mapCoordinateForm" type="com.contract.mapcoordinate.web.MapCoordinateForm"/> <action path="/mapCoordinate" parameter="operation" type="com.contract.mapcoordinate.web.MapCoordinateAction" name="mapCoordinateForm" scope="session"> <forward name="consult" path="/WEB-INF/jsp/mapCoordinate/mapCoordinateConsult.jsp" redirect="false"/> </action> MapCoodinateAction.java public class MapCoordinateAction extends LookupDispatchAction { protected Map getKeyMethodMap() { Map map = new HashMap(); map.put("button.consult", "consult"); map.put("button.search", "search"); return map; } public ActionForward consult( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { MapCoordinateForm mcf = (MapCoordinateForm) form; try { MapCoordinateDelegate delegate = new MapCoordinateDelegate(); request.setAttribute("stateOptionItemList", (java.util.Collection)delegate.getStates()); request.setAttribute("addressTypeOptionItemList", delegate.getAddressTypes()); return mapping.findForward("consult"); } catch (MapCoordinateDelegateException mcde) { ActionErrors erros = new ActionErrors(); erros.add( "error_on_server", new ActionError("errors.on.server", mcde.getMessage())); saveErrors(request, erros); return mapping.findForward("exceptions"); } } public ActionForward search( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { StringBuffer buffer = new StringBuffer("http://geo/geo/geoSearch.do?searchInitialName=False"); MapCoordinateForm mcf = (MapCoordinateForm) form; try { MapCoordinateDelegate delegate = new MapCoordinateDelegate(); request.setAttribute("stateOptionItemList", (java.util.Collection)delegate.getStates()); request.setAttribute("addressTypeOptionItemList", delegate.getAddressTypes()); mcf.setMapCoordinateVOList( delegate.process(buffer.toString()) ); return mapping.findForward("consult"); } catch (MapCoordinateDelegateException mcde) { ActionErrors erros = new ActionErrors(); erros.add( "error_on_server", new ActionError("errors.on.server", mcde.getMessage())); saveErrors(request, erros); return mapping.findForward("exceptions"); } } mapCoordinateConsult.jsp <html:form action="mapCoordinate.html"> <table width="750" height="50" border="0" cellpadding="0" cellspacing="0" bgcolor="#C0C0C0"> <tr> <td width="100%" colspan="2" background="#E0E0E0"> <table border="0" width="100%" cellpadding="0" cellspacing="0"> <tr background="#CCCCCC"> <td align="center" class=td width="100%"><b><bean:message key="mapCoordinateConsult.title"/></b></td> </tr> </table> </td> <br> <br> </tr> </table> <table width="750" border="0" cellpadding="0" cellspacing="0"> </table> <table width="750" border="0" cellpadding="0" cellspacing="0"> <tr> <td align="right"> <html:submit property="operation" styleClass="flatButton"> <bean:message key="button.search"/> </html:submit> </td> </tr> </table> <br> </html:form> ================================ My problem is when I call the Action with http://localhost/mapCoordinate.do?operation=Consult, it works done. But when I call the Action from Form, with a submit button button.search(ApplicationResource.properties), I receive the following error: HTTP ERROR: 400 Request[/mapCoordinate] does not contain handler parameter named operation Thanks --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] hi, ><html:form action="mapCoordinate.html"> ><table width="750" height="50" border="0" cellpadding="0" cellspacing="0" bgcolor="#C0C0C0"> ><tr> what is action="mapCoordinate.html" ? Change it to "mapCoordinate". Regards, Sanoj Antony -----Original Message----- From: Struts Framework [mailto:[EMAIL PROTECTED] Sent: Monday, April 12, 2004 8:41 PM To: [EMAIL PROTECTED] Subject: Problem with LookupDispatchAction and parameter operation Hi, I'm using the following environment with LookupDispatchAction. struts-config.xml <form-bean name="mapCoordinateForm" type="com.contract.mapcoordinate.web.MapCoordinateForm"/> <action path="/mapCoordinate" parameter="operation" type="com.contract.mapcoordinate.web.MapCoordinateAction" name="mapCoordinateForm" scope="session"> <forward name="consult" path="/WEB-INF/jsp/mapCoordinate/mapCoordinateConsult.jsp" redirect="false"/> </action> MapCoodinateAction.java public class MapCoordinateAction extends LookupDispatchAction { protected Map getKeyMethodMap() { Map map = new HashMap(); map.put("button.consult", "consult"); map.put("button.search", "search"); return map; } public ActionForward consult( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { MapCoordinateForm mcf = (MapCoordinateForm) form; try { MapCoordinateDelegate delegate = new MapCoordinateDelegate(); request.setAttribute("stateOptionItemList", (java.util.Collection)delegate.getStates()); request.setAttribute("addressTypeOptionItemList", delegate.getAddressTypes()); return mapping.findForward("consult"); } catch (MapCoordinateDelegateException mcde) { ActionErrors erros = new ActionErrors(); erros.add( "error_on_server", new ActionError("errors.on.server", mcde.getMessage())); saveErrors(request, erros); return mapping.findForward("exceptions"); } } public ActionForward search( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { StringBuffer buffer = new StringBuffer("http://geo/geo/geoSearch.do?searchInitialName=False"); MapCoordinateForm mcf = (MapCoordinateForm) form; try { MapCoordinateDelegate delegate = new MapCoordinateDelegate(); request.setAttribute("stateOptionItemList", (java.util.Collection)delegate.getStates()); request.setAttribute("addressTypeOptionItemList", delegate.getAddressTypes()); mcf.setMapCoordinateVOList( delegate.process(buffer.toString()) ); return mapping.findForward("consult"); } catch (MapCoordinateDelegateException mcde) { ActionErrors erros = new ActionErrors(); erros.add( "error_on_server", new ActionError("errors.on.server", mcde.getMessage())); saveErrors(request, erros); return mapping.findForward("exceptions"); } } mapCoordinateConsult.jsp <html:form action="mapCoordinate.html"> <table width="750" height="50" border="0" cellpadding="0" cellspacing="0" bgcolor="#C0C0C0"> <tr> <td width="100%" colspan="2" background="#E0E0E0"> <table border="0" width="100%" cellpadding="0" cellspacing="0"> <tr background="#CCCCCC"> <td align="center" class=td width="100%"><b><bean:message key="mapCoordinateConsult.title"/></b></td> </tr> </table> </td> <br> <br> </tr> </table> <table width="750" border="0" cellpadding="0" cellspacing="0"> </table> <table width="750" border="0" cellpadding="0" cellspacing="0"> <tr> <td align="right"> <html:submit property="operation" styleClass="flatButton"> <bean:message key="button.search"/> </html:submit> </td> </tr> </table> <br> </html:form> ================================ My problem is when I call the Action with http://localhost/mapCoordinate.do?operation=Consult, it works done. But when I call the Action from Form, with a submit button button.search(ApplicationResource.properties), I receive the following error: HTTP ERROR: 400 Request[/mapCoordinate] does not contain handler parameter named operation Thanks --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]