Nathan Jantz wrote:

> Hi all,
> I'm interested in being able to pass objects from jsp to jsp using the
> setAttribute() and getAttribute() methods without the use of a controller
> servlet or bean but have been unsuccessful.  Here is some code that I have
> tried:
>

Your code is not going to work, because when the user presses the hyperlink to go
to receivingPage.jsp, that comes in on a separate request.  Using request
attributes is useful only when you use <jsp:include> or <jsp:forward> (or the
servlet equivalents with a RequestDispatcher) while handling a single request.

Try using session scoped attributes instead of request scoped attributes in order
to maintain the values from one request to the next.

Check the servlet and JSP specifications (available at
<http://java.sun.com/products/servlet> and <http://java.sun.com/products/jsp>) for
more information on the scopes and how they work.

Craig McClanahan

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to