Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Print Multiple Lines with out.write  RSS feed

 
anand phulwani
Ranch Hand
Posts: 242
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Ranchers,

i need to print multiple lines with carriage returns,how can i do that,is it possible with out.write or by any other method,here is what i need to do,its something like this,any ideas??

 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The out object has a "println" method.

But why would you ever want to do this?
Why not just jump out of your scriptlet and just write literal output straight to the page as if it were a static HTML file. You wouldn't have to worry about escaping anything and your JSPs would be much cleaner looking and easier to maintain.

Isn't that the whole point of templating engines?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!