File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes String Reading Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "String Reading" Watch "String Reading" New topic

String Reading

thippareddy mallikarjuna reddy

Joined: Mar 08, 2006
Posts: 19
Hi Pals,

I have written one jsp.
I want read strings from textarea which are separated by cama.

Example : the string like this.

Airport Parking,Virus Software,Export Data,Hardware

i want stings like:
1.Airport Parking
2.Virus Software
3.Export Data

[ June 05, 2006: Message edited by: Bear Bibeault ]
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63839

Nothing JSP-specific about this. So moved to the Java in General (beginnner) forum.

Hint: check out the methods on the String class for methods that might help you in this.

[Asking smart questions] [About Bear] [Books by Bear]
vijaya vinayagam

Joined: Dec 09, 2005
Posts: 21
in String class you have a split method using that split the String based upon "," and get individual Strings.
Kia Phia Ben
Ranch Hand

Joined: Dec 16, 2005
Posts: 48
You can using StringTokenizer.
I agree. Here's the link:
subject: String Reading
It's not a secret anymore!