-
servlet does not read space
Hey folks,
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[5], 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...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
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
|
Bookmarks