JSP Converter is a little tool for converting your legacy JSP / JSTL / JSP EL stuff into Scalate.
To use jsp2ssp you need to install the Scalate tool
To convert the JSP files in a directory foo just type
scalate jsp2ssp foo
You should see lots of ssp files generated.
Note that JSP Converter is not totally perfect; there are going to be JSP files that need a little bit of of manual tweaking. We've done our best to cover most of the common things to try reduce as much manual intervention as possible.
Iterating over maps tends to be different in scala. In JSTL / EL you tend to iterate over a map which returns a Map.Entry object. In Scala you get a tuple of key and value. So instead of this…
#for (entry <- someMap)
${entry.getKey} = ${entry.getValue}
#end
A more idiomatic scala way would be
#for ((key, value) <- someMap)
${key} = ${value}
#end
Though we support the former JSTL/EL style by using an implicit conversion of a tuple to a MapEntry object which has a getKey and getValue method.The implicit conversion comes from the org.fusesource.scalate.util.TemplateConversions companion object.