21

I hear about Haml as a templating engine mostly in the Ruby world. Can it also be used in Java projects?

Yen
  • 2,176
  • 3
  • 19
  • 27

8 Answers8

11

2 years after this question was asked (:P) there are:

h3adache
  • 1,296
  • 11
  • 18
  • 2
    Scalate project is for Scala and not JAVA. – sheki Dec 31 '11 at 05:44
  • 1
    downvoting for that is interesting considering that scala runs on the jvm and interops with java just fine. – h3adache Jan 12 '12 at 16:59
  • But it is not about the JVM, using Scalate requires knowing Scala and using an app framework of Scala like Scalatra. – sheki Jan 13 '12 at 07:06
  • I'm going to cast my vote with the downvoters here. Scala is fun and all, but that doesn't make it Java, and the fact that it runs on Java or can be used in conjunction with Java is like saying you can embed assembly language in C, and C compiles to machine language, therefore C is assembly language. The original question was about a Java implementation. – John Lockwood Dec 26 '13 at 16:11
  • 1
    Did you even both to read scalate's documentation for how to use jade? http://scalate.github.io/scalate/documentation/user-guide.html#using_scalate_as_servlet_filter_in_your_web_application There is no scala involved. – h3adache Aug 17 '15 at 20:52
10

It seems someone started a project for Java.

SztupY
  • 10,291
  • 8
  • 64
  • 87
7

There's a list of Haml implementations on the Wikipedia page. At the moment, there isn't one for Java.

Update

There has been a Java implementation for a few years now : https://github.com/raymyers/JHaml

ocodo
  • 29,401
  • 18
  • 105
  • 117
Natalie Weizenbaum
  • 5,884
  • 28
  • 22
3

Scalate can be integrated with Spring

mfirry
  • 3,634
  • 1
  • 26
  • 36
1

Perhaps through JRuby?

Marty Lamb
  • 1,980
  • 1
  • 14
  • 10
0

planning to add HAML support in JPublish. It will use JRuby.

Florin
  • 528
  • 5
  • 14
0

Use JRuby!
How to is in this answer.

Community
  • 1
  • 1
Joep
  • 4,003
  • 3
  • 28
  • 32
-1

HAML is dependent on Ruby. I know there is a Python clone of HAML, not sure about Java.

Although, SASS/Compass are language agnostic.

kush
  • 16,408
  • 17
  • 48
  • 65
  • No it's not. There is HAML for PHP like https://github.com/arnaud-lb/MtHaml and https://github.com/mervick/yii2-mthaml – Chloe Aug 23 '18 at 01:09