This is a template engine, all writen in Java, support Java 5+.
<dependency>
<groupId>com.github.zqq90.webit-script</groupId>
<artifactId>webit-script</artifactId>
<version>1.5.1</version>
</dependency>
webit-script-1.5.1.jar
<300KB
Engine engine = Engine.create("/webit-script-config.props", extraSettings);
Template template = engine.getTemplate("/your/template/path/filename.ext");
template.merge(parametersMap, outputStream);
//template.merge(parametersMap, writer);
Hello Webit Script!
<%
var books;
{
for(book : books){
%>
${for.iter.index}.《${book.name}》 ¥${book.price}
<%
}
}
{
//this is a function
var func = function(a, b){
return a + b + arguments[3];
};
echo func("a", "b", "c");
echo '\n';
}
{
var map = {
1: 1,
"key2": "value2",
3: 2 + 1
};
map[5] = 2 + 3;
for(key, value : map){
echo key + ":" +value + "\n";
}
}
%>
- Jodd Madvoc
- JFinal
- Spring MVC
- Struts2
- Servlet & Filter
// Waiting update
Webit Script is released under the BSD License. See the bundled LICENSE file for details.
Webit Script 依据 BSD许可证发布。详细请看 LICENSE 文件。
- Jodd-props under the BSD License. License file
- ASM under the BSD License.License file