• Post Reply Bookmark Topic Watch Topic
  • New Topic

pass an array of values to Applet from JSP

 
ruilin yang
Ranch Hand
Posts: 334
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am working on using JSP to launch an Applet to plot a curve (x,y value pairs). Currently, I use PARAM mechnism to pass name and value pairs into the Applet. It is not efficient to pass a pair one by one.
Anybody please give me some instruction on this.
Thanks in advance
Ruilin
 
ruilin yang
Ranch Hand
Posts: 334
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am usinf jsp to call an Applet to plot a set of (x,y) data. I need pass x,y values into the Applet from JSP.
I know how to use PARAM to pass a few pairs of data. But for many pairs I would like to pass them as array.
Anybody can give me some lights would be great.
Thanks in advance.
Ruilin
 
Aleksey Matiychenko
Ranch Hand
Posts: 178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One option would be to pass a Parameter with a number of points.
and then a set of parameters such as "Point 1","Point 2" etc.

 
ruilin yang
Ranch Hand
Posts: 334
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Aleksey,
Thanks for your comments.
Yes, it will work. The problem is that you have to hard code each data value. Assume I have 100 points, it will become not practical.
I am going to try just use one name with value equals of a array.
If it takes all array values with some delimiter between each value. Then I can use StringTokenizer to saparate each value.
It is nice to discuss with you. Please comment more.
Regards,
Ruilin
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!