@Override
public XmlParser newParser() throws ClassNotFoundException
{
// Create a TLD parser
XmlParser parser = new XmlParser(false);
URL taglib11=null;
URL taglib12=null;
URL taglib20=null;
URL taglib21=null;
try
{
Class<?> jsp_page = Loader.loadClass(WebXmlConfiguration.class,"javax.servlet.jsp.JspPage");
taglib11=jsp_page.getResource("javax/servlet/jsp/resources/web-jsptaglibrary_1_1.dtd");
taglib12=jsp_page.getResource("javax/servlet/jsp/resources/web-jsptaglibrary_1_2.dtd");
taglib20=jsp_page.getResource("javax/servlet/jsp/resources/web-jsptaglibrary_2_0.xsd");
taglib21=jsp_page.getResource("javax/servlet/jsp/resources/web-jsptaglibrary_2_1.xsd");
}
catch(Exception e)
{
LOG.ignore(e);
}
finally
{
if(taglib11==null)
taglib11=Loader.getResource(Servlet.class,"javax/servlet/jsp/resources/web-jsptaglibrary_1_1.dtd");
if(taglib12==null)
taglib12=Loader.getResource(Servlet.class,"javax/servlet/jsp/resources/web-jsptaglibrary_1_2.dtd");
if(taglib20==null)
taglib20=Loader.getResource(Servlet.class,"javax/servlet/jsp/resources/web-jsptaglibrary_2_0.xsd");
if(taglib21==null)
taglib21=Loader.getResource(Servlet.class,"javax/servlet/jsp/resources/web-jsptaglibrary_2_1.xsd");
}
if(taglib11!=null)
{
redirect(parser, "web-jsptaglib_1_1.dtd",taglib11);
redirect(parser, "web-jsptaglibrary_1_1.dtd",taglib11);
}
if(taglib12!=null)
{
redirect(parser, "web-jsptaglib_1_2.dtd",taglib12);
redirect(parser, "web-jsptaglibrary_1_2.dtd",taglib12);
}
if(taglib20!=null)
{
redirect(parser, "web-jsptaglib_2_0.xsd",taglib20);
redirect(parser, "web-jsptaglibrary_2_0.xsd",taglib20);
}
if(taglib21!=null)
{
redirect(parser, "web-jsptaglib_2_1.xsd",taglib21);
redirect(parser, "web-jsptaglibrary_2_1.xsd",taglib21);
}
parser.setXpath("/taglib/listener/listener-class");
return parser;
}