Here's an excerpt from
http://jakarta.apache.org/struts/doc-1.0.2/api/org/apache/struts/taglib/bean
/package-summary.html

Copy A Dynamically Created Response - You can generate an internal request
to the application you are running, and turn the response data that is
returned from that request into a bean (of type String). One possible use
for this technique is to acquire dynamically created XML formatted data that
will be stored in a bean and later manipulated (such as by applying an XSLT
stylesheet). If the current request is part of a session, the generated
request for the include will also include the session identifier (and thus
be considered part of the same session).
    
<bean:include id="text" name="/generateXml?param1=aśm2=b"/>


The key point here is "dynamically created response".  If you are including
a JSP page, it will not be included in it's exact form (i.e. it will not
contain any JSP tags, scriptlets, etc).  Instead, it will be compiled and
executed first, and the resultant response (i.e. HTML I assume) will be
included as a bean in the "outer" page.  Since the "included" page is being
compiled and executed BEFORE it is included, it will not have access to any
of the beans defined in the "outer" page.  It will, however, have access to
request, session, and application scopes - so you could use <bean:define
...> tags in your "included" page to make these beans available.

Hope this helps somewhat.

        Lindsay


 -----Original Message-----
From:   Calle Sollander [mailto:[EMAIL PROTECTED]] 
Sent:   19 July 2002 18:17
To:     mvc-programmers
Subject:        RE: [MVC-Programmers] bean:include question

Sorry I forgot to say that I'm using Struts 1.0.2.
Regards Calle

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] On Behalf Of Calle
Sollander
Sent: den 19 juli 2002 19:05
To: [EMAIL PROTECTED]
Subject: [MVC-Programmers] bean:include question


Hello!
I'm trying to use the <bean:include page=......> tag so that the
included page uses the form bean of the "outer" page, but I can't get it
to work. The included page finds the form bean, or at least the
<logic:present ....> tag finds the formbean, but when I try to use the
<bean:write ...
> all the propertys are empty, which they are not if i use the same
<bean:write ...> tag in the "outer" page just before the <bean:include
page=....>.

Can anybody explain or help me with this?

Thanks in advance!!

Regards Calle
PS: Thanks Lindsay I followed your advice.

_______________________________________________
MVC-Programmers mailing list
[EMAIL PROTECTED]
http://www.netbean.net/mailman/listinfo/mvc-programmers

_______________________________________________
MVC-Programmers mailing list
[EMAIL PROTECTED]
http://www.netbean.net/mailman/listinfo/mvc-programmers
_______________________________________________
MVC-Programmers mailing list
[EMAIL PROTECTED]
http://www.netbean.net/mailman/listinfo/mvc-programmers

Reply via email to