Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

String split problem

Status
Not open for further replies.

sandeepmur

Programmer
Dec 14, 2003
295
PT
Hi,

I have a page A which loads users from a db and passes it into another page B as a String separated by ";".

In page B, I use a String Tokenizer to tokenize the string and for every string obtained, I display it along with a chkbox next to it..

The problem is when page B loads with the received String, it hangs. I found out that the problem is with the String length. If I send a shorter String, the page loads fine but the String I am passing has about 10000 characters (540 words separated by ;).

But I found strange was that, I loaded this entire String into another variable in a test jsp and it worked fine..

Whats happening ??

TIA
 
how are you passing this string from A to B? why not try some other object instead, like ArrayList?

there used to be pretty small size restrictions with String in past versions of java, something like 64k in 1.2 maybe? i think now it holds far more than 64k, so just your 10k should still be ok.


=========================================================
-jeff
try { succeed(); } catch(E) { tryAgain(); } finally { rtfm(); }
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top