• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tomcat appends CRLF to the response string?

 
Bruce Jin
Ranch Hand
Posts: 672
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I send a string to browser as attachment. When I save the attachment to disk and open it, the string always ends with a CRLF (Catrige return, newline).
Does Tomcat do this or browser do this?



There are 3 lines in the saved file from browser: (You can see the CRLF when using notepad++ and turn on "view all charrachters")

1 abcd
2 CRLF
3
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64959
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Read the javadoc for the println() method.
 
Bruce Jin
Ranch Hand
Posts: 672
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Bear.

Looks like I forgot the basics of Java!

Thanks.

Bruce
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64959
86
IntelliJ IDE Java jQuery Mac Mac OS X
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic