Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Java > Java and JDK > JSP Basics
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 18th, 2004, 06:41 AM
Registered User
 
Join Date: Oct 2004
Location: mumbai, Maharashtra, India.
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 :)

Reply With Quote
  #2 (permalink)  
Old October 20th, 2004, 02:22 PM
Friend of Wrox
 
Join Date: Jul 2004
Location: , , .
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.

Reply With Quote
  #3 (permalink)  
Old October 23rd, 2004, 06:50 PM
Authorized User
 
Join Date: Mar 2004
Location: , , .
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

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 09:20 AM.


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