本文整理了Java中org.eclipse.jetty.webapp.WebAppContext.setResourceAlias()
方法的一些代码示例,展示了WebAppContext.setResourceAlias()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebAppContext.setResourceAlias()
方法的具体详情如下:
包路径:org.eclipse.jetty.webapp.WebAppContext
类名称:WebAppContext
方法名:setResourceAlias
[英]Set Resource Alias. Resource aliases map resource uri's within a context. They may optionally be used by a handler when looking for a resource.
[中]设置资源别名。资源别名映射上下文中的资源uri。处理程序在查找资源时可以选择使用它们。
代码示例来源:origin: org.eclipse.jetty/jetty-webapp
public void visitTagLib(WebAppContext context, Descriptor descriptor, XmlParser.Node node)
{
//Additive across web.xml and web-fragment.xml
String uri = node.getString("taglib-uri", false, true);
String location = node.getString("taglib-location", false, true);
context.setResourceAlias(uri, location);
JspConfig config = (JspConfig)context.getServletContext().getJspConfigDescriptor();
if (config == null)
{
config = new JspConfig();
context.getServletContext().setJspConfigDescriptor(config);
}
TagLib tl = new TagLib();
tl.setTaglibLocation(location);
tl.setTaglibURI(uri);
config.addTaglibDescriptor(tl);
}
代码示例来源:origin: jenkinsci/winstone
public void visitTagLib(WebAppContext context, Descriptor descriptor, XmlParser.Node node)
{
//Additive across web.xml and web-fragment.xml
String uri = node.getString("taglib-uri", false, true);
String location = node.getString("taglib-location", false, true);
context.setResourceAlias(uri, location);
JspConfig config = (JspConfig)context.getServletContext().getJspConfigDescriptor();
if (config == null)
{
config = new JspConfig();
context.getServletContext().setJspConfigDescriptor(config);
}
TagLib tl = new TagLib();
tl.setTaglibLocation(location);
tl.setTaglibURI(uri);
config.addTaglibDescriptor(tl);
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server
/**
* @param context
* @param descriptor
* @param node
*/
protected void visitTagLib(WebAppContext context, Descriptor descriptor, XmlParser.Node node)
{
//Additive across web.xml and web-fragment.xml
String uri = node.getString("taglib-uri", false, true);
String location = node.getString("taglib-location", false, true);
context.setResourceAlias(uri, location);
JspConfig config = (JspConfig)context.getServletContext().getJspConfigDescriptor();
if (config == null)
{
config = new JspConfig();
context.getServletContext().setJspConfigDescriptor(config);
}
TagLib tl = new TagLib();
tl.setTaglibLocation(location);
tl.setTaglibURI(uri);
config.addTaglibDescriptor(tl);
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
/**
* @param context
* @param descriptor
* @param node
*/
protected void visitTagLib(WebAppContext context, Descriptor descriptor, XmlParser.Node node)
{
//Additive across web.xml and web-fragment.xml
String uri = node.getString("taglib-uri", false, true);
String location = node.getString("taglib-location", false, true);
context.setResourceAlias(uri, location);
JspConfig config = (JspConfig)context.getServletContext().getJspConfigDescriptor();
if (config == null)
{
config = new JspConfig();
context.getServletContext().setJspConfigDescriptor(config);
}
TagLib tl = new TagLib();
tl.setTaglibLocation(location);
tl.setTaglibURI(uri);
config.addTaglibDescriptor(tl);
}
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
/**
* @param context
* @param descriptor
* @param node
*/
protected void visitTagLib(WebAppContext context, Descriptor descriptor, XmlParser.Node node)
{
//Additive across web.xml and web-fragment.xml
String uri = node.getString("taglib-uri", false, true);
String location = node.getString("taglib-location", false, true);
context.setResourceAlias(uri, location);
JspConfig config = (JspConfig)context.getServletContext().getJspConfigDescriptor();
if (config == null)
{
config = new JspConfig();
context.getServletContext().setJspConfigDescriptor(config);
}
TagLib tl = new TagLib();
tl.setTaglibLocation(location);
tl.setTaglibURI(uri);
config.addTaglibDescriptor(tl);
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-webapp
/**
* @param context
* @param descriptor
* @param node
*/
protected void visitTagLib(WebAppContext context, Descriptor descriptor, XmlParser.Node node)
{
//Additive across web.xml and web-fragment.xml
String uri = node.getString("taglib-uri", false, true);
String location = node.getString("taglib-location", false, true);
context.setResourceAlias(uri, location);
JspConfig config = (JspConfig)context.getServletContext().getJspConfigDescriptor();
if (config == null)
{
config = new JspConfig();
context.getServletContext().setJspConfigDescriptor(config);
}
TagLib tl = new TagLib();
tl.setTaglibLocation(location);
tl.setTaglibURI(uri);
config.addTaglibDescriptor(tl);
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-plus
/**
* @param context
* @param descriptor
* @param node
*/
protected void visitTagLib(WebAppContext context, Descriptor descriptor, XmlParser.Node node)
{
//Additive across web.xml and web-fragment.xml
String uri = node.getString("taglib-uri", false, true);
String location = node.getString("taglib-location", false, true);
context.setResourceAlias(uri, location);
JspConfig config = (JspConfig)context.getServletContext().getJspConfigDescriptor();
if (config == null)
{
config = new JspConfig();
context.getServletContext().setJspConfigDescriptor(config);
}
TagLib tl = new TagLib();
tl.setTaglibLocation(location);
tl.setTaglibURI(uri);
config.addTaglibDescriptor(tl);
}
内容来源于网络,如有侵权,请联系作者删除!