Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to pass values from text area to array  RSS feed

 
Rajesh Veluchamy
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That is in the text area i am having the values as

100
101
102
103

and so on

no i want this in array as
a[0] = 100
a[1] = 101
a[2] = 102
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If in the text area they're written like that, then there must be newline (or return) characters. You can search for those in the request parameter in your servlet, and use them to split the value. Something like:
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!