You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by me...@bpam.fr on 2002/11/07 14:02:20 UTC

No getter method for property message

I'm tearing my hair off about this very strange
error message.

here it is.
javax.servlet.ServletException: No getter method for property targetDir of bean
org.apache.struts.taglib.html.BEAN

I get it when my jsp  is called. it seems like my own form bean is not
recognized even when I do define all
thins in my config file.

here is the definition in the struts config file

<form-bean      name="readMailForm"
                    type="com.bpam.mail.forms.ReadingMailForm"/>

 <action    path="/initReception"
               name="readMailForm"
               type="com.bpam.mail.actions.CreateReceptionAction"
              scope="request"
           validate="false">
      <forward name="success"              path="/admReception.jsp"/>
    </action>

the form bean class contains simple String attributes.

in my jsp, the form is defined like this :
 <html:form action="/filterMails">
     <html:hidden property="taskAction" value="save"/>
      <table border="0"  width="90%" align="center" CELLPADDING="0" CELLSPACING=
"1" border="0" cla"form">


               <tr height="40">
                    <td width="3%">&nbsp;</td>
                    <td><bean:message key="libelle.repertoire"/></td>
                    <td>
                         <html:text property="targetDir" size="30" maxlength=
"50"/>&nbsp;*
                    </td>
               </tr>
      </table>
      </html:form>

when I call them in admReception.jsp, I get error message above saying that the
targetDir has no getter method. what' wrong.




I've searching the all archive list, but there is nothing similar to my problem.

if someone can help .

Meissa






--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: No getter method for property message

Posted by ajTreece <aj...@sun.com>.
Meissa...

 From looking at your code your the jsp is getting it's form definition 
from the action="filterMails". I would guess that  your form definition 
for fillterMails is not readMailForm.... If not otherwise specified, the 
required ActionForm is determined by the value you put in <html:form 
action="xxx">


Later, aj



meissa.Sakho@bpam.fr wrote:

>I'm tearing my hair off about this very strange
>error message.
>
>here it is.
>javax.servlet.ServletException: No getter method for property targetDir of bean
>org.apache.struts.taglib.html.BEAN
>
>I get it when my jsp  is called. it seems like my own form bean is not
>recognized even when I do define all
>thins in my config file.
>
>here is the definition in the struts config file
>
><form-bean      name="readMailForm"
>                    type="com.bpam.mail.forms.ReadingMailForm"/>
>
> <action    path="/initReception"
>               name="readMailForm"
>               type="com.bpam.mail.actions.CreateReceptionAction"
>              scope="request"
>           validate="false">
>      <forward name="success"              path="/admReception.jsp"/>
>    </action>
>
>the form bean class contains simple String attributes.
>
>in my jsp, the form is defined like this :
> <html:form action="/filterMails">
>     <html:hidden property="taskAction" value="save"/>
>      <table border="0"  width="90%" align="center" CELLPADDING="0" CELLSPACING=
>"1" border="0" cla"form">
>
>
>               <tr height="40">
>                    <td width="3%">&nbsp;</td>
>                    <td><bean:message key="libelle.repertoire"/></td>
>                    <td>
>                         <html:text property="targetDir" size="30" maxlength=
>"50"/>&nbsp;*
>                    </td>
>               </tr>
>      </table>
>      </html:form>
>
>when I call them in admReception.jsp, I get error message above saying that the
>targetDir has no getter method. what' wrong.
>
>
>
>
>I've searching the all archive list, but there is nothing similar to my problem.
>
>if someone can help .
>
>Meissa
>
>
>
>
>
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>  
>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: No getter method for property message

Posted by Postfach 4711 <po...@gmx.de>.
Hello meissa,

could you please mail your "/filterMails" action mapping, the
corresponding form bean, and action form?

Thursday, November 7, 2002, 2:02:20 PM, you wrote:

mSbf> I'm tearing my hair off about this very strange
mSbf> error message.

mSbf> here it is.
mSbf> javax.servlet.ServletException: No getter method for property targetDir of bean
mSbf> org.apache.struts.taglib.html.BEAN

mSbf> I get it when my jsp  is called. it seems like my own form bean is not
mSbf> recognized even when I do define all
mSbf> thins in my config file.

mSbf> here is the definition in the struts config file

mSbf> <form-bean      name="readMailForm"
mSbf>                     type="com.bpam.mail.forms.ReadingMailForm"/>

mSbf>  <action    path="/initReception"
mSbf>                name="readMailForm"
mSbf>                type="com.bpam.mail.actions.CreateReceptionAction"
mSbf>               scope="request"
mSbf>            validate="false">
mSbf>       <forward name="success"              path="/admReception.jsp"/>
mSbf>     </action>

mSbf> the form bean class contains simple String attributes.

mSbf> in my jsp, the form is defined like this :
mSbf>  <html:form action="/filterMails">
mSbf>      <html:hidden property="taskAction" value="save"/>
mSbf>       <table border="0"  width="90%" align="center" CELLPADDING="0" CELLSPACING=
mSbf> "1" border="0" cla"form">


mSbf>                <tr height="40">
mSbf>                     <td width="3%">&nbsp;</td>
mSbf>                     <td><bean:message key="libelle.repertoire"/></td>
mSbf>                     <td>
mSbf>                          <html:text property="targetDir" size="30" maxlength=
"50"/>>&nbsp;*
mSbf>                     </td>
mSbf>                </tr>
mSbf>       </table>
mSbf>       </html:form>

mSbf> when I call them in admReception.jsp, I get error message above saying that the
mSbf> targetDir has no getter method. what' wrong.




mSbf> I've searching the all archive list, but there is nothing similar to my problem.

mSbf> if someone can help .

mSbf> Meissa






mSbf> --
mSbf> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
mSbf> For additional commands, e-mail: <ma...@jakarta.apache.org>



-- 
Best regards,
Dirk


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: No getter method for property message

Posted by Melanie Harris <ha...@yahoo.com>.
ok, now that I made a fool of myself with that last comment. I just thought of something.  He also had a text tag with a property=blah... ,  but had not yet created an ActionForm with that property/attribute.  That was likely the problem where we were getting the error.  oh well, was one of the two.
 meissa.Sakho@bpam.fr wrote:I'm tearing my hair off about this very strange
error message.

here it is.
javax.servlet.ServletException: No getter method for property targetDir of bean
org.apache.struts.taglib.html.BEAN

I get it when my jsp is called. it seems like my own form bean is not
recognized even when I do define all
thins in my config file.

here is the definition in the struts config file

type="com.bpam.mail.forms.ReadingMailForm"/>

name="readMailForm"
type="com.bpam.mail.actions.CreateReceptionAction"
scope="request"
validate="false">



the form bean class contains simple String attributes.

in my jsp, the form is defined like this :


"1" border="0" cla"form">



 


"50"/> *





when I call them in admReception.jsp, I get error message above saying that the
targetDir has no getter method. what' wrong.




I've searching the all archive list, but there is nothing similar to my problem.

if someone can help .

Meissa






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



---------------------------------
Do you Yahoo!?
U2 on LAUNCH - Exclusive medley & videos from Greatest Hits CD

Re: No getter method for property message

Posted by Melanie Harris <ha...@yahoo.com>.
Meissa,
Just so happens that another developer I work with was getting this same error yesterday so I went over and helped resolve the problem.  This is going to sound strange and I have no good explination as to why this was causing the problem, but this is what worked.
In a .jsp he had a <strutsbean:message key="page.required.note"/> .   He was saving the .jsp first and then next (after already saved the .jsp with that reference),  going into the ApplicationResources.properties file and adding the entry for page.required.note then saving ApplicationResources.properties.   We deleted the tag in the .jsp and then saved it, edited the ApplicationResources.properties file first and saved the change, next went back into the .jsp and added the tag back then saved the .jsp, and then it worked.   Using Tomcat.  
Now, the above might have a sneaky feeling that our little exercise might  just have been a fluke (can't really imagine why order of saves would have been the problem),  but strange things happen.
 
 meissa.Sakho@bpam.fr wrote:I'm tearing my hair off about this very strange
error message.

here it is.
javax.servlet.ServletException: No getter method for property targetDir of bean
org.apache.struts.taglib.html.BEAN

I get it when my jsp is called. it seems like my own form bean is not
recognized even when I do define all
thins in my config file.

here is the definition in the struts config file

type="com.bpam.mail.forms.ReadingMailForm"/>

name="readMailForm"
type="com.bpam.mail.actions.CreateReceptionAction"
scope="request"
validate="false">



the form bean class contains simple String attributes.

in my jsp, the form is defined like this :


"1" border="0" cla"form">



 


"50"/> *





when I call them in admReception.jsp, I get error message above saying that the
targetDir has no getter method. what' wrong.




I've searching the all archive list, but there is nothing similar to my problem.

if someone can help .

Meissa






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



---------------------------------
Do you Yahoo!?
U2 on LAUNCH - Exclusive medley & videos from Greatest Hits CD