It's not a secret anymore!
The moose likes Beginning Java and the fly likes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark ""Here-doc" string quoting in Java (/JSP?)" Watch ""Here-doc" string quoting in Java (/JSP?)" New topic

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

Jamie Jackson
Ranch Hand

Joined: Jan 11, 2005
Posts: 58
Does Java have the concept of "here-doc" string quoting in the manner of Perl/PHP? (If not, why?)

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

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.)

I agree. Here's the link:
subject: "Here-doc" string quoting in Java (/JSP?)
It's not a secret anymore!