Nope, that's not OK.

You can do what you describe, but not by passing the Hashtable as a
parameter in the URL.
Instead, put the Hashtable in the request
request.setAttribute("parameter1",myHash)
and redirect to the second JSP.
where you can use myHash = (Hashtable)request.getAttribute("parameter1")
Of course, you cannot use response.sendRedirect to go from one page to
another.
You need to use requestdispatcher.include or forward
or the page include or forward tags (which is essentially the same)

Geert

> -----Original Message-----
> From: A mailing list about Java Server Pages specification and reference
> [mailto:[EMAIL PROTECTED]]On Behalf Of Firat Ozcan
> Sent: donderdag 30 november 2000 21:41
> To: [EMAIL PROTECTED]
> Subject: passing hashtables in request
>
>
> Is it ok to do the following:
>
> JSP A puts all its parameters into "Hashtable myHash". And then it passes
> this myHash object to JSP B within a URL such as
> "/path_to_JSP_B/B.jsp?parameter1=myHash".
>
> And then upon being called, JSP B does this:
>
> Hashtable passedHash = (Hashtable)request.getAttribute("myHash");
>
> and then enumerates the contents of passedHash.
>
> I am doing this because I need to pass like 100 parameters from
> JSP A to JSP
> B. I am wondering if the above method will create a memory problem.
>
> Thanks for the help
>
> ==================================================================
> =========
> 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
>
>

===========================================================================
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

Reply via email to