Win a copy of The Journey To Enterprise Agility this week in the Agile and Other Processes forum! And see the welcome thread for 20% off.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

Print Multiple Lines with out.write  RSS feed

 
Ranch Hand
Posts: 243
  • 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??

 
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?
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!