Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

"Here-doc" string quoting in Java (/JSP?)

 
Jamie Jackson
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does Java have the concept of "here-doc" string quoting in the manner of Perl/PHP? (If not, why?)

For instance:
$myString = <<MYDELIM;
This
is
"easy."
It is now $time o'clock.
MYDELIM

Ack! My colleague just sent me a URL* that dashes my hopes of here-doc within Java. Oh well, are there any (simple) hacks in JSP that will allow me to have a big, multi-line hunk of, say, HTML within a JSP string assignment or method body? (I'm thinking not.)

Thanks,
Jamie
*Sadness
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic