On 8/14/06, Daoud Abdelmonem Faleh <[EMAIL PROTECTED]> wrote:
Hello folks,
I use struts 1.2.9 and deploy to oc4j 10.1.3
My struts-config.xml containes:
...
<form-bean type="com.myapp.EditPersonneEtrangereForm"
name="editPersonneEtrangereForm"/>
...
<action input="/user/jsp/personneEtrangere/PersonneEtrangereDetails.jsp"
type="com.myapp.EditPersonneEtrangere" validate="false"
scope="request" path="/editPersonneEtrangere"
name="editPersonneEtrangereForm">
<set-property property="cancellable" value="true"/>
<forward path="/listAllPersonneEtrangere.do" name="cancel"/>
<forward path="/listAllPersonneEtrangere.do" name="edited"/>
</action>
...
PersonneEtrangereDetails.jsp has:
....
<html:form action="/editPersonneEtrangere.do">
....
<td width="76%"><html:text styleClass="ReadOnlyTextField"
property="perEtrDateNaissanceStr" onchange="isDate(this.value)"
maxlength="10"/>
....
public class EditPersonneEtrangereForm extends
org.apache.struts.action.ActionForm {
....
private Date perEtrDateNaissance;
private String perEtrDateNaissanceStr;
...
public String getPerEtrDateNaissanceStr() {
return SQLDateConvertor.convertDateFormat
(getPerEtrDateNaissance(),"dd/MM/yyyy");
//return perEtrDateNaissanceStr;
}
public void setPerEtrDateNaissanceStr(String perEtrDateNaissanceStr) {
this.perEtrDateNaissanceStr = perEtrDateNaissanceStr;
this.perEtrDateNaissance =
SQLDateConvertor.convertToSqlDateFormat
(perEtrDateNaissanceStr,"dd/MM/yyyy");
}
...
When i request PersonneEtrangereDetails.jsp I get the followin exception
javax.servlet.jsp.JspException: No getter method for property:
"perEtrDateNaissanceStr" of bean:
"com.myapp.EditPersonneEtrangereForm"
What am I doing wrong or missing?
Thanks folks.
sounds like the whole thing is real simple, and you do not need to mention
each property of your form bean in the struts-config.xml
All i can think of is maybe u should check your spellings, make sure proerty
name in form bean and in the jsp match,recompile your ActionForm
class,restart server.
Make sure the correct ActionForm class exists on the server.
--
Puneet