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...
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL