gpt4 book ai didi

httl.web.WebEngine.setServletContext()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-23 23:39:05 27 4
gpt4 key购买 nike

本文整理了Java中httl.web.WebEngine.setServletContext()方法的一些代码示例,展示了WebEngine.setServletContext()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebEngine.setServletContext()方法的具体详情如下:
包路径:httl.web.WebEngine
类名称:WebEngine
方法名:setServletContext

WebEngine.setServletContext介绍

暂无

代码示例

代码示例来源:origin: com.github.httl/httl

public static void setRequest(HttpServletRequest request) {
  if (request != null && request.getSession() != null) {
    setServletContext(request.getSession().getServletContext());
  }
  ServletResolver.setRequest(request);
}

代码示例来源:origin: httl/httl

public static void setRequest(HttpServletRequest request) {
  if (request != null && request.getSession() != null) {
    setServletContext(request.getSession().getServletContext());
  }
  ServletResolver.setRequest(request);
}

代码示例来源:origin: com.github.httl/httl

public static String getTemplateSuffix(ServletContext servletContext) {
  setServletContext(servletContext);
  return getTemplateSuffix();
}

代码示例来源:origin: httl/httl

public static String getTemplateSuffix(ServletContext servletContext) {
  setServletContext(servletContext);
  return getTemplateSuffix();
}

代码示例来源:origin: httl/httl

public static Engine getEngine() {
  if (ENGINE == null) {
    Object request = Context.getContext().get("request");
    if (request instanceof HttpServletRequest && ((HttpServletRequest) request).getSession() != null) {
      setServletContext(((HttpServletRequest) request).getSession().getServletContext());
    } else {
      setServletContext(ServletLoader.getAndCheckServletContext());
    }
  }
  return ENGINE;
}

代码示例来源:origin: com.github.httl/httl

public static Engine getEngine() {
  if (ENGINE == null) {
    Object request = Context.getContext().get("request");
    if (request instanceof HttpServletRequest && ((HttpServletRequest) request).getSession() != null) {
      setServletContext(((HttpServletRequest) request).getSession().getServletContext());
    } else {
      setServletContext(ServletLoader.getAndCheckServletContext());
    }
  }
  return ENGINE;
}

代码示例来源:origin: httl/httl

public void afterPropertiesSet() throws Exception {
  WebEngine.setServletContext(getServletContext());
  if (getSuffix() == null || getSuffix().length() == 0) {
    super.setSuffix(WebEngine.getTemplateSuffix());
  }
}

代码示例来源:origin: httl/httl

@Override
public boolean checkResource(Locale locale) throws Exception {
  WebEngine.setServletContext(getServletContext());
  return WebEngine.getEngine().hasResource(getUrl(), locale);
}

代码示例来源:origin: httl/httl

WebEngine.setServletContext(servletContext);

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com