Search in sources :

Example 1 with TagLib

use of org.eclipse.jetty.servlet.ServletContextHandler.TagLib in project jetty.project by eclipse.

the class StandardDescriptorProcessor method visitTagLib.

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);
}
Also used : JspConfig(org.eclipse.jetty.servlet.ServletContextHandler.JspConfig) TagLib(org.eclipse.jetty.servlet.ServletContextHandler.TagLib)

Aggregations

JspConfig (org.eclipse.jetty.servlet.ServletContextHandler.JspConfig)1 TagLib (org.eclipse.jetty.servlet.ServletContextHandler.TagLib)1