You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by hunkpapa <hu...@gmx.de> on 2001/03/05 18:34:23 UTC

bean:write

hi i try to use the bean:write in my jsp-file:

 <bean:write name="pagedata" property="data"  />

I've made a class with the name Pagedata.class in the web-inf\class dir.

If i try to run the JSP this message come:

...
Root cause:

javax.servlet.jsp.JspException: Cannot find bean Pagedata in scope
request
        at
org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:212)

.
.
.

Re: bean:write

Posted by Martin Cooper <ma...@tumbleweed.com>.
The <bean:write> tag accesses a property of an existing bean. In the case
you quoted, it is looking for the 'data' property of the 'pagedata' bean.

The error that you are seeing suggests that you do not have an object named
'pagedata' in the request scope. You'll need to create an object of your
Pagedata class and store it in request scope with the name 'pagedata' for
this to work.

Hope this helps.

--
Martin Cooper

----- Original Message -----
From: "hunkpapa" <hu...@gmx.de>
To: <st...@jakarta.apache.org>
Sent: Monday, March 05, 2001 9:34 AM
Subject: bean:write


> hi i try to use the bean:write in my jsp-file:
>
>  <bean:write name="pagedata" property="data"  />
>
>
> I've made a class with the name Pagedata.class in the web-inf\class dir.
>
> If i try to run the JSP this message come:
>
>
> ...
> Root cause:
>
>
> javax.servlet.jsp.JspException: Cannot find bean Pagedata in scope
> request
>         at
> org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:212)
>
>
> .
> .
> .
>
>