Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

java web playframework: how to ignore Evaluating Expression in a Template?

In view (may be Application/index.html), I had the content like:

...
<div>${don't need evaluate this content} </div>
...

I don't want Play! evaluate it, only display absolutely this content on screen, so how can I do it ?

Update:

Thank Loic and Niels, I have just checked them, both solutions:

#{verbatim}${don't need evaluate this content}#{/verbatim}

and

<div>'${don't need evaluate this content}' </div>

didn't work!

Note that, I use XML in response type.

like image 283
Tiny Gipxy Avatar asked May 06 '26 13:05

Tiny Gipxy


2 Answers

I managed to get this working using the following

<div>&#36;{don't need evaluate this content}</div>
like image 159
Codemwnci Avatar answered May 09 '26 14:05

Codemwnci


The best practice is to use the verbatim tag:

#{verbatim}${don't need evaluate this content}#{/verbatim}
like image 44
Loïc Guillois Avatar answered May 09 '26 14:05

Loïc Guillois



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!