You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Eric Larson <er...@teaminteract.com> on 2003/03/10 03:09:08 UTC

Re: Passing a Collection object from 1 JSP to another without scoping it to session

I think that you will find the answer to this to be no. The scope of a
request object is the servlet service method, so if you are processing a
different request, you are automatically going to have a different
request object.


On Sun, 2003-03-09 at 21:02, Andrew Latham wrote:
> Hope someone has had success with this.
> 
> Basically using Struts the results of a query are returned to a JSP page
> and accessible via the "request" object with something like:
> <%java.util.Collection requestCollection = (java.util.Collection)
> request.getAttribute("classificationlist"); %>
> 
> I'm trying to pass this to another JSP page. I've tried:
> <%request.setAttribute("classificationlist", requestCollection); %>
> 
> Which doesn't error but its value is NULL on the next JSP. All doco and
> other discussion forums suggest this method, but what I'm finding is
> this will only work if I use the <jsp:forward> or <jsp:include>. Is
> there a way to pass this to a page which is access by a <a
> href="nextpage.jsp">Next</a>? I currently do this by rescoping to



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