This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem in newline

 
Puspender Tanwar
Ranch Hand
Posts: 397
2
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

This is my doPost method, when it is running, giving the output with the name paramter as puspender :
hello name is puspender

but i have included the newline with "\n", then why not the line2 is on the next line to line1 ?
why not the output is :
hello
name is puspender
 
Paul Clapham
Sheriff
Posts: 21581
33
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're generating HTML, remember? So your question is about the HTML you generated, not how you generated the HTML.

You should review how HTML handles newlines and other whitespace characters.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65339
97
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not only is your HTML invalid (nothing should come after the </html> closing tag), that's not how HTML works. newlines are not significant. You create "lines" in HTML via HTML elements and CSS.
 
Puspender Tanwar
Ranch Hand
Posts: 397
2
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Paul and Bear
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic