struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Struts Framework" <str...@whs.com.br>
Subject Fwd: Fwd: RE: Problem with LookupDispatchAction and parameter operation
Date Mon, 12 Apr 2004 18:10:45 GMT
I don't believe!!!

I remove war file from jboss-3.2.1 and put in Tomcat 4 and works!!!!


------------- Segue mensagem encaminhada -------------

De: "Struts Framework" <struts@whs.com.br>
Data: Mon, 12 Apr 2004 12:30:59 -0300
Para: user@struts.apache.org
Assunto: Fwd: RE: Problem with LookupDispatchAction and parameter operation


I hava already this solution, but without sucess.


------------- Segue mensagem encaminhada -------------

De: "Sanoj, Antony (IE10)" <Sanoj.Antony@honeywell.com>
Data: Mon, 12 Apr 2004 08:26:07 -0700
Para: Struts Users Mailing List <user@struts.apache.org>
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:struts@whs.com.br]
Sent: Monday, April 12, 2004 8:41 PM
To: user@struts.apache.org
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: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org

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







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:struts@whs.com.br]
Sent: Monday, April 12, 2004 8:41 PM
To: user@struts.apache.org
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: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org

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







Mime
View raw message