Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

displaying the database value in text area  RSS feed

 
arun ram.ci
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi

I have one trouble in displaying the database value in my text area, my text area field name is "mobile number". most important thing is displaying the the value(nothing but the telephone number)

number1,number2,number3,.......because i have to give this format in order to send s m s , there should be a no whitespace the numbers and each number should separated with comma. i have tried

different solutions i can able to get all numbers from database and i can able to display them with comma but inside text area the numbers are displaying in this format.

number1,


number2,


number3,....

but i need number1,number2,number3,.........number600.

the code i tried is



can any one send solution for this ,number should be displayed in this format number1,number2,number3.......
 
chandrakant karale
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try this


You are printing single mobile number each time; so its appearing on seperate line. Concatenate all numbers in one string and then print the string in text area.
Still, you may have need to eliminate the last appended comma.

One more thing ; it is a bad design to have database connection establishment code, query execution code in JSP. You should consider moving this code to separate java classes.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!