I have tried setting things up right, using all combinations that I can think of, but 
I still get the error, 

Error Message: No getter method for property geozoneID of bean 
org.apache.struts.taglib.html.BEAN 

Here is what I have now......

Relevant code from the JSP:

<html:form action="GeoZoneAction" focus="geozoneID">

 blah, blah, blah,

<html:text property="geozoneID" size="3" maxlength="3"/>

Here is the relevant code from the Action Form:

package tgt.transportation.points.form;

import java.util.Vector;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionError;

import org.apache.struts.action.ActionErrors;

import org.apache.struts.action.ActionForm;

import org.apache.struts.action.ActionMapping;

/**

* Form Bean for Geographic Zone Maintenance

*/

public class GeoZoneForm extends ActionForm {

protected String geozoneID = null;



protected String geozoneName = null;





/**

* The maintenance action we are performing (Create or Edit).

*/

private String action = "Edit";

/**

* Should we auto-connect at startup time?

*/

private boolean autoConnect = false;

/**

* The host name.

*/

private String host = null;



/**

* Gets the geozoneID

* @return Returns a String

*/

public String getgeozoneID() 

{return this.geozoneID;}

/**

* Sets the geozoneID

* @param geozoneID The geozoneID to set

*/

public void setgeozoneID(String geozoneID) 

{this.geozoneID = geozoneID;}



/**

* Gets the geozoneName

* @return Returns a String

*/

public String getgeozoneName() 

{return this.geozoneName;}

/**

* Sets the geozoneName

* @param geozoneName The geozoneName to set

*/

public void setgeozoneName(String geozoneName) 

{this.geozoneName = geozoneName;}



// ----------------------------------------------------------- Properties

 

/**

* Return the maintenance action.

*/

public String getAction() {

return (this.action)

}.





/**

* Set the maintenance action.

*

* @param action The new maintenance action.

*/

public void setAction(String action) {

this.action = action;

}

 

/**

* Return the auto-connect flag.

*/

public boolean getAutoConnect() {

return (this.autoConnect);

}



/**

* Set the auto-connect flag.

*

* @param autoConnect The new auto-connect flag

*/

public void setAutoConnect(boolean autoConnect) {

this.autoConnect = autoConnect;

}

 

/**

* Return the host name.

*/

public String getHost() {

return (this.host);

}





/**

* Set the host name.

*

* @param host The host name

*/

public void setHost(String host) {

this.host = host;

}



/**

* Reset all properties to their default values.

*

* @param mapping The mapping used to select this instance

* @param request The servlet request we are processing

*/



public void reset(ActionMapping mapping, HttpServletRequest request) {

this.action = "Edit";

this.autoConnect = false;

this.host = null;

this.geozoneID = null;

this.geozoneName = null;

}





/**

* Validate the properties that have been set from this HTTP request,

* and return an <code>ActionErrors</code> object that encapsulates any

* validation errors that have been found. If no errors are found, return

* <code>null</code> or an <code>ActionErrors</code> object with no

* recorded error messages.

*

* @param mapping The mapping used to select this instance

* @param request The servlet request we are processing

*/

public ActionErrors validate(ActionMapping mapping,

HttpServletRequest request) {

ActionErrors errors = new ActionErrors();

if ((geozoneID == null) || (geozoneID.length() < 1))

errors.add("geozoneID", new ActionError("error.geozoneID.required"));

if ((geozoneName == null) || (geozoneName.length() < 1))

errors.add("geozoneName", new ActionError("error.geozoneName.required"));

return errors;

}

}

Here is the relevant config file code:

<form-beans>

<!-- Geographic Zone Maintenance form bean -->

<form-bean name="GeoZoneForm" 

type="tgt.transportation.points.form.GeoZoneForm"/>



<!-- Transportation Points Relationship Maintenance form bean -->

<form-bean name="TransPointsRelMaintForm" 

type="tgt.transportation.points.form.TransPointsRelMaintForm"/>



</form-beans>

<action-mappings>

blah, blah, blah



<!-- Geographic Zone Maintenance Action -->

<action path="/GeoZoneAction"

type="tgt.transportation.points.action.GeoZoneAction"

name="GeoZoneForm"

scope="request"

validate="true"

input="/iGeoZoneMaint.jsp">

  <forward name="Menu" path="/Menu.jsp"/>

  <forward name="GeoZoneMaint" path="/iGeoZoneMaint.jsp"/>

</action>

</action-mappings>

 

 "Karr, David" <[EMAIL PROTECTED]> wrote:
The property represented in your ActionForm is "geoZoneID", not
"geozoneID". You have to make sure your case references match.

> -----Original Message-----
> From: David Rothschadl [mailto:[EMAIL PROTECTED]]
> 
> Hello,
> 
> I have created the action form that contains the getter 
> method for a property geozoneID, but when I try to run my 
> project on the local server, I keep getting the error message:
> 
> Error Message: No getter method for property geozoneID of 
> bean org.apache.struts.taglib.html.BEAN
> 
> Here is the code for my actionForm: 

> public String getGeoZoneID() 
> {return this.geozoneID;}
> 
> public void setGeoZoneID(String geozoneID) 
> {this.geozoneID = geozoneID;}

--
To unsubscribe, e-mail: 
For additional commands, e-mail: 

Reply via email to