You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Pawel Rzepa <rz...@agh.edu.pl> on 2002/07/01 08:31:37 UTC

Re: bean:include and request attributes

Barbara Post wrote:

> did you redeclare the taglibs at the beginning at the included jsp ? it is
> necessary.

I know, I did it. I've put this scriplet into main jsp file and the included one:

<%
 for(java.util.Enumeration enum=request.getAttributeNames();
enum.hasMoreElements();)
{ %>
request attribute: <%= (String) enum.nextElement() %>
<%
}
%> (Don't pay attention to typing mistakes - it worked)

The main file found attributes, included one didn't any.

> well, jsp:useBean does work, why would bean:include bug ? :-)

Not jsp:useBean, but jsp:include - I suppose it was just your mistake.
Regarding to your question - why jsp:include works and bean:include doesn't? I'd
really love to know... :-)

Best regards,
  Paul

>
>
> Babs
> ----- Original Message -----
> From: Pawel Rzepa <rz...@agh.edu.pl>
> To: Struts Users Mailing List <st...@jakarta.apache.org>
> Sent: Friday, June 28, 2002 4:23 PM
> Subject: bean:include and request attributes
>
> > Hi everyone!
> >  Does bean:include forwards request attributes to the included page? I
> > have registered a bean as a request attribute and I can touch it from
> > main page but not from the included one. I put some Java code into both
> > pages that lists request attributes names and while inside the main page
> > all the attributes are visible inside the included one they aren't
> > (request.getAttributeNames() is empty). Is it expected behaviour?
> >
> > What's more <jsp:include ...> works properly...
> > Configuration: Struts 1.0/Tomcat 4.0.3/Solaris 8
> >
> > Regards,
> >   Pawel
> > --
> > Pawel Rzepa                           Department of Computer Science
> > rzepa@agh.edu.pl           University of Mining and Metallurgy (AGH)
> > tel: +48 (12) 617 39 82                      fax: +48 (12) 617 39 66
> >
> >
> >
> > --
> > 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>

--
Pawel Rzepa                           Department of Computer Science
rzepa@agh.edu.pl           University of Mining and Metallurgy (AGH)
tel: +48 (12) 617 39 82                      fax: +48 (12) 617 39 66



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