servlet does not read space
I am trying to write a servlet reading a database and pass the info to another servlet. Below is the line that I have a problem with.
out.println("<INPUT TYPE = radio name = selection VALUE= "+city[i]+">");
city[i] is actually the name of cities that I retrieved from a database. "i" is the index for the cities. The line works fine until cities with more than one word. For example, when I tried to read city, which has "New York" stored inside as a string, it will only read "New", which makes value = New, not New York.
Can anybody help me on this? I am going crazy...