6 Rendering web views

6.1 Understanding view resolution

public interface ViewResolver {
  View resolveViewName(String viewName, Locale locale) throws Exception;
}

public interface View {
  String getContentType();
  void render(Map<String, ?> model,
              HttpServletRequest request,
              HttpServletResponse response) throws Exception;
}

6.2 Creating JSP views

略。

6.3 Defining a layout with Apache Tiles views

略。

6.4 Working with Thymeleaf

表单绑定:

By using th:field, you get both a value attribute set to the value of firstName and also a name attribute set to firstName.

results matching ""

    No results matching ""