The Play Framework template comments syntax

When you want to create Play Framework template comments, use the @* ... *@ syntax. Here's a one-line comment:

@* COMMENT *@

Here's a multiline comment:

@*
 * Four score
 * and seven year ago
 * our fathers ...
 *@

(You can format that however you want.)

You can use comments as the first line of Play Framework templates (before the function declaration):

@*************************************
 * The 'Hello, world' page           *
 *                                   *
 * @param msg The message to display *
 *************************************@
@(msg: String)

<h1>Hello, world</h1>

I found this information on the Play Framework Templates Syntax page.

This website is a little one-man operation. If you found this information helpful, I’d appreciate it if you would share it.

Add new comment

The content of this field is kept private and will not be shown publicly.

Anonymous format

  • Allowed HTML tags: <em> <strong> <cite> <code> <ul type> <ol start type> <li> <pre>
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.