本文整理了Java中freemarker.cache.WebappTemplateLoader.getContextPath()
方法的一些代码示例,展示了WebappTemplateLoader.getContextPath()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebappTemplateLoader.getContextPath()
方法的具体详情如下:
包路径:freemarker.cache.WebappTemplateLoader
类名称:WebappTemplateLoader
方法名:getContextPath
[英]Gets the context path if we are on Servlet 2.5+, or else returns failure description string.
[中]如果我们在Servlet 2.5+上,则获取上下文路径,否则返回失败描述字符串。
代码示例来源:origin: org.freemarker/freemarker
/**
* Show class name and some details that are useful in template-not-found errors.
*
* @since 2.3.21
*/
@Override
public String toString() {
return TemplateLoaderUtils.getClassNameForToString(this)
+ "(subdirPath=" + StringUtil.jQuote(subdirPath)
+ ", servletContext={contextPath=" + StringUtil.jQuote(getContextPath())
+ ", displayName=" + StringUtil.jQuote(servletContext.getServletContextName()) + "})";
}
代码示例来源:origin: org.freemarker/freemarker-gae
/**
* Show class name and some details that are useful in template-not-found errors.
*
* @since 2.3.21
*/
@Override
public String toString() {
return TemplateLoaderUtils.getClassNameForToString(this)
+ "(subdirPath=" + StringUtil.jQuote(subdirPath)
+ ", servletContext={contextPath=" + StringUtil.jQuote(getContextPath())
+ ", displayName=" + StringUtil.jQuote(servletContext.getServletContextName()) + "})";
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.freemarker
/**
* Show class name and some details that are useful in template-not-found errors.
*
* @since 2.3.21
*/
@Override
public String toString() {
return TemplateLoaderUtils.getClassNameForToString(this)
+ "(subdirPath=" + StringUtil.jQuote(subdirPath)
+ ", servletContext={contextPath=" + StringUtil.jQuote(getContextPath())
+ ", displayName=" + StringUtil.jQuote(servletContext.getServletContextName()) + "})";
}
内容来源于网络,如有侵权,请联系作者删除!