You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by an...@freenet.de on 2007/08/13 16:25:41 UTC

[Struts 1.2] javax.servlet.jsp.JspException: No getter method for property: "error

Hello!

I'm getting a currious errormessage, which I'm not understanding with the background written later on:

javax.servlet.jsp.JspException: No getter method for property: "errorm" of bean: "camp"

Background:

The bean camp is set while validating, because an error happened. Therefore, the original page is shown again, the errormessage is shown and the bean camp is correctly detected. But the property errorm can't be resolved!

jsp:
<logic:present name="camp">
<bean:logic name="camp" property="errorm" id="ma">...</bean:logic>
</logic:present>



ActionErrors validate (ActionMapping mp, HttpServletRequest rq) {
...
CheckActiv ca=new CheckActive();
rq.setAttribute("camp",ca);
}

class CheckActive {
...
public ArrayList <String> getErrorm() {
    return new ArrayList <String>(missingpaket.keySet());
    }
...
}

The bean camp is detected in the jsp, but the property errorm (which gives ca.getErrorm()) can't be found. I am helpless ... . What am I doing wrong?


Thanks for any hint,
kind regards,
Andreas Hartmann









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


Re: [Struts 1.2] javax.servlet.jsp.JspException: No getter method for property: "error

Posted by Andreas Hartmann <an...@freenet.de>.
Hello Paul,

but the bean is there - otherwise, the logic:iterate part wouldn't be
accessed at all after <bean:present>. I can't understand this.


Besides that, I now solved it this way:
I put the needed object to an already existing session object. Addressing
this way works fine.


BTW:
The jsp must be:
<logic:present name="camp">
<logic:iterate name="camp" property="errorm" id="ma">...</logic:iterate>
</logic:present>

But this doesn't matter at all :-)


Kind regards,
Andreas Hartmann


Paul Benedict wrote:
> Make sure you're not redirecting. You will lose request attributes if you do
> so.
> 
> On 8/13/07, andihartmann@freenet.de <an...@freenet.de> wrote:
>>
>> Hello!
>>
>> I'm getting a currious errormessage, which I'm not understanding with the
>> background written later on:
>>
>> javax.servlet.jsp.JspException: No getter method for property: "errorm" of
>> bean: "camp"
>>
>> Background:
>>
>> The bean camp is set while validating, because an error happened.
>> Therefore, the original page is shown again, the errormessage is shown and
>> the bean camp is correctly detected. But the property errorm can't be
>> resolved!
>>
>> jsp:
>> <logic:present name="camp">
>> <logic:iterate name="camp" property="errorm" id="ma">...</logic:iterate>
>> </logic:present>
>>
>>
>>
>> ActionErrors validate (ActionMapping mp, HttpServletRequest rq) {
>> ...
>> CheckActiv ca=new CheckActive();
>> rq.setAttribute("camp",ca);
>> }
>>
>> class CheckActive {
>> ...
>> public ArrayList <String> getErrorm() {
>>     return new ArrayList <String>(missingpaket.keySet());
>>     }
>> ...
>> }
>>
>> The bean camp is detected in the jsp, but the property errorm (which gives
>> ca.getErrorm()) can't be found. I am helpless ... . What am I doing wrong?


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


Re: [Struts 1.2] javax.servlet.jsp.JspException: No getter method for property: "error

Posted by Paul Benedict <pb...@apache.org>.
Make sure you're not redirecting. You will lose request attributes if you do
so.

On 8/13/07, andihartmann@freenet.de <an...@freenet.de> wrote:
>
> Hello!
>
> I'm getting a currious errormessage, which I'm not understanding with the
> background written later on:
>
> javax.servlet.jsp.JspException: No getter method for property: "errorm" of
> bean: "camp"
>
> Background:
>
> The bean camp is set while validating, because an error happened.
> Therefore, the original page is shown again, the errormessage is shown and
> the bean camp is correctly detected. But the property errorm can't be
> resolved!
>
> jsp:
> <logic:present name="camp">
> <bean:logic name="camp" property="errorm" id="ma">...</bean:logic>
> </logic:present>
>
>
>
> ActionErrors validate (ActionMapping mp, HttpServletRequest rq) {
> ...
> CheckActiv ca=new CheckActive();
> rq.setAttribute("camp",ca);
> }
>
> class CheckActive {
> ...
> public ArrayList <String> getErrorm() {
>     return new ArrayList <String>(missingpaket.keySet());
>     }
> ...
> }
>
> The bean camp is detected in the jsp, but the property errorm (which gives
> ca.getErrorm()) can't be found. I am helpless ... . What am I doing wrong?
>
>
> Thanks for any hint,
> kind regards,
> Andreas Hartmann
>
>
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>