Jay,
Here is the deal!
I guess the second result you are getting from the database is not of the form:
st[1] = "first "second" third" - (lets say this type 1)
but of the form:
st[1] = "first " second " third" - (type 2)
So, when the code is executed
java sees the space right before the
word second and assumes that, thats the end of the string that it needs to read.
If you could somehow manipulate the incoming data as shown in type 1 instead of as in type 2, it should work as you expected it to be.
I know this is not exactly the solution you are looking for, but this is what I could think of right on top of my head. Let me sleep on this and see if I could come up with a better solution.
Venkat
Originally posted by jay Rotti:
Hello,
This value I am getting from database.
while(resultset.next())
{
string[i]=resultset.getString("full_name");
i++;
}
after that in jsp I am displaying the same. Till this stage i don't have any problem.
After this stage I need to replace every occurance of " with + and so on. This where I have problem.
Either I need find index of " or i should replace " with + without "\". Because this is happening dynamically I need to find a way to do this replace dynamically.
any help ?
Thanks