This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Servlets and the fly likes Truncated Strings in PrintWriter println Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Truncated Strings in PrintWriter println " Watch "Truncated Strings in PrintWriter println " New topic
Author

Truncated Strings in PrintWriter println

Greg Neef
Ranch Hand

Joined: Jun 16, 2003
Posts: 82
When I have a string with a blank in it, I am only getting the last part of the s.toString() returned to the browser. I am guessing I have to do something creative with quotes to resolve this problem but it is not jumping out at me.


SCJP 1.4
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12756
    
    5
HTML attributes should be enclosed in quotes to avoid ambiguity and strange results.

Should be (if I got them all):

For years browsers have let you get away with no quotes but all new code should stick to strict XHTML standards.
Bill
Greg Neef
Ranch Hand

Joined: Jun 16, 2003
Posts: 82
That gets it. Thanks
 
 
subject: Truncated Strings in PrintWriter println
 
Similar Threads
UrlRewriting+servlets -Error
passing hidden forms problem
Servlet becomming slow
org.apache.jasper.JasperException: java.lang.ArrayIndexOutOfBoundsException: 8
About create a session!