wit-servlet

A template-like script and engine, all written with Java.

Лицензия

Лицензия

Группа

Группа

org.febit.wit
Идентификатор

Идентификатор

wit-servlet
Последняя версия

Последняя версия

2.7.0-beta
Дата

Дата

Тип

Тип

jar
Описание

Описание

wit-servlet
A template-like script and engine, all written with Java.
Организация-разработчик

Организация-разработчик

Febit

Скачать wit-servlet

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.febit.wit/wit-servlet/ -->
<dependency>
    <groupId>org.febit.wit</groupId>
    <artifactId>wit-servlet</artifactId>
    <version>2.7.0-beta</version>
</dependency>
// https://jarcasting.com/artifacts/org.febit.wit/wit-servlet/
implementation 'org.febit.wit:wit-servlet:2.7.0-beta'
// https://jarcasting.com/artifacts/org.febit.wit/wit-servlet/
implementation ("org.febit.wit:wit-servlet:2.7.0-beta")
'org.febit.wit:wit-servlet:jar:2.7.0-beta'
<dependency org="org.febit.wit" name="wit-servlet" rev="2.7.0-beta">
  <artifact name="wit-servlet" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.febit.wit', module='wit-servlet', version='2.7.0-beta')
)
libraryDependencies += "org.febit.wit" % "wit-servlet" % "2.7.0-beta"
[org.febit.wit/wit-servlet "2.7.0-beta"]

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
org.febit.wit : wit-core jar 2.7.0-beta

provided (1)

Идентификатор библиотеки Тип Версия
javax.servlet : servlet-api jar 2.5

Модули Проекта

Данный проект не имеет модулей.

Febit Wit

BSD License Build Status QQ Group: 302505483

This is a template engine, all written in Java, support Java 8+.

How to use

  • Maven:
<dependency>
    <groupId>org.febit.wit</groupId>
    <artifactId>wit-core</artifactId>
    <version>2.6.0</version>
</dependency>
  • or Gradle
compile 'org.febit.wit:wit-core:2.6.0'
  • demo:
Engine engine = Engine.create();
Template template = engine.getTemplate("/demo.wit");
template.merge(params, out);

Hello Wit

Hello Wit!
<%
var books
{
    for(book : books){
%>
${for.iter.index}.《${book.name} ¥${book.price}
<%
    }
}
{
    var func = function(a, b){
        return a + b + arguments[3]
    }
    echo func("a", "b", "c")
}
{
    var map = {
        books,
        1: 1,
        "key2": "value2",
        3: 2 + 1
    }
    map[5] = 2 + 3
    map.~put("6", 2*3)
    for(key, value : map){
        echo key + ":" +value + "\n"
    }
}
%>

More examples

Official Support

  • Jodd Madvoc
  • Spring MVC
  • Servlet & Filter

Demo

License

Febit Wit is released under the BSD License. See the bundled LICENSE file for details.

Third-party Licenses

Bug report

github-issue

org.febit.wit

Версии библиотеки

Версия
2.7.0-beta
2.6.0
2.5.0-beta
2.4.0-beta
2.3.0-beta
2.2.0-beta
2.1.0-beta
2.0.0-beta