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]

Reply via email to