本文整理汇总了Java中freemarker.ext.servlet.HttpRequestParametersHashModel类的典型用法代码示例。如果您正苦于以下问题:Java HttpRequestParametersHashModel类的具体用法?Java HttpRequestParametersHashModel怎么用?Java HttpRequestParametersHashModel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
HttpRequestParametersHashModel类属于freemarker.ext.servlet包,在下文中一共展示了HttpRequestParametersHashModel类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: buildTemplateModel
import freemarker.ext.servlet.HttpRequestParametersHashModel; //导入依赖的package包/类
/**
* Build a FreeMarker template model for the given model Map.
* <p>The default implementation builds a {@link AllHttpScopesHashModel}.
* @param model the model to use for rendering
* @param request current HTTP request
* @param response current servlet response
* @return the FreeMarker template model, as a {@link SimpleHash} or subclass thereof
*/
protected SimpleHash buildTemplateModel(Map<String, Object> model, HttpServletRequest request, HttpServletResponse response) {
AllHttpScopesHashModel fmModel = new AllHttpScopesHashModel(getObjectWrapper(), getServletContext(), request);
fmModel.put(FreemarkerServlet.KEY_JSP_TAGLIBS, this.taglibFactory);
fmModel.put(FreemarkerServlet.KEY_APPLICATION, this.servletContextHashModel);
fmModel.put(FreemarkerServlet.KEY_SESSION, buildSessionModel(request, response));
fmModel.put(FreemarkerServlet.KEY_REQUEST, new HttpRequestHashModel(request, response, getObjectWrapper()));
fmModel.put(FreemarkerServlet.KEY_REQUEST_PARAMETERS, new HttpRequestParametersHashModel(request));
fmModel.putAll(model);
return fmModel;
}
开发者ID:langtianya,项目名称:spring4-understanding,代码行数:19,代码来源:FreeMarkerView.java
示例2: buildTemplateModel
import freemarker.ext.servlet.HttpRequestParametersHashModel; //导入依赖的package包/类
protected SimpleHash buildTemplateModel(Map<String, Object> model, WebContext rc) {
AllHttpScopesHashModel fmModel = new AllHttpScopesHashModel(getObjectWrapper(), rc.getContext(), rc.getRequest());
fmModel.put(FreemarkerServlet.KEY_JSP_TAGLIBS, this.taglibFactory);
fmModel.put(FreemarkerServlet.KEY_APPLICATION, this.servletContextHashModel);
fmModel.put(FreemarkerServlet.KEY_SESSION, buildSessionModel(rc.getRequest(), rc.getResponse()));
fmModel.put(FreemarkerServlet.KEY_REQUEST, new HttpRequestHashModel(rc.getRequest(), rc.getResponse(), getObjectWrapper()));
fmModel.put(FreemarkerServlet.KEY_REQUEST_PARAMETERS, new HttpRequestParametersHashModel(rc.getRequest()));
fmModel.putAll(model);
return fmModel;
}
开发者ID:ketayao,项目名称:fensy,代码行数:11,代码来源:FreeMarkerView.java
注:本文中的freemarker.ext.servlet.HttpRequestParametersHashModel类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论