Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > JSP Basics
|
JSP Basics Beginning-level questions on JSP. More advanced coders should post to Pro JSP.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the JSP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 18th, 2004, 06:41 AM
Registered User
 
Join Date: Oct 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to mrrgupta Send a message via Yahoo to mrrgupta
Default how to pass arrays as parameters ???

Hi,

I am trying to send arrays as parameters from one jsp page to another but am unable to do so..
 Both the arrays are arrays of string and i need topass it and display it at the next page..
Could anyone suggest how do i achieve this..

Thanks in advance ,
Rohit :)

 
Old October 20th, 2004, 02:22 PM
Friend of Wrox
 
Join Date: Jul 2004
Posts: 204
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello,

I am not sure, but know that there are 2 ways to pass data from one page to the other, GET and POST. You will not be able to use the GET method as this relies on the url to pass data, you should use the POST method which can be used to pass files, but Ive never used it to pass an array and am not even sure if you can.

An alternative could be do declare the variables in one page that is included in both the jsp pages you wish to use, I have done this with primitive data types, not for the reasons you want to, but suffice to say the variable data was consistent accross pages.

 
Old October 23rd, 2004, 06:50 PM
Authorized User
 
Join Date: Mar 2004
Posts: 74
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Arrays are always passed by reference in java. so in the calling function, you can just pass the name of the array. and in the function definition, you can put like for ex. String myArray []. i don't know if that answers your questions






Similar Threads
Thread Thread Starter Forum Replies Last Post
how to pass parameters in Crystal to subreports vayrapetov BOOK: Professional Crystal Reports for VS.NET 0 November 1st, 2007 09:37 AM
to pass parameters rashmid HTML Code Clinic 1 May 30th, 2005 11:10 PM
How to pass parameters from a multiselect listbox Jeff1218 Classic ASP Databases 3 February 14th, 2005 03:39 PM
How I can pass parameters to 2 ASP files at ones? zukit Classic ASP Databases 4 December 15th, 2004 05:20 AM
cannot pass parameters between forms deerebuck BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 3 February 15th, 2004 05:12 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.