Setting the properties in a bean is better than relying on CGI parameters.
Your servlet has to transfer the CGI parameter to the bean in order for it to work.
Your bean must be created within "session-scope" if you want to keep it around
for the next request or so.
--
Peter Pilgrim
G.O.A.T
"the Greatest Of All Time"
---------------------------------------- Message History
----------------------------------------
From: "Carbo, Danielle (Exchange)" <[EMAIL PROTECTED]>@java.sun.com> on 24/01/2001 11:31
EST
Please respond to A mailing list about Java Server Pages specification and reference
<[EMAIL PROTECTED]>
DELEGATED - Sent by: A mailing list about Java Server Pages specification and
[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
cc:
Subject: JSP parameter passing
Hello -
What is the preferred method of passing/sharing data between a servlet and
various JSP pages? I am working in a MVC architecture where the servlet is
the controller and dispatches a JSP page depending on the business rules.
Also, each JSP page sets certain data attributes to be used in other JSP
pages. Currently, I am setting/getting attributes on the request object
along with passing a long list of parameters from the JSP page to the
servlet. I was wondering if instead I should/could set the properties on a
bean and pass it between the servlet and JSP pages..?
Any comments and/or suggestions are appreciated...
--
This e-mail may contain confidential and/or privileged information. If you are not the
intended recipient (or have received this e-mail in error) please notify the sender
immediately and destroy this e-mail. Any unauthorised copying, disclosure or
distribution of the material in this e-mail is strictly forbidden.
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
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