el静态方法错误
只要添加tld文件就会出错<?xml version="1.0" encoding="UTF-8"?>
<taglib xmlns="http://java.
xmlns:xsi="http://www.
xsi:schemaLocation="http://java.
version="2.1">
<tilb-version>1.0</tilb-version>
<description>用于转换特殊字符</description>
<uri>myelfun</uri>
<function>
<name>ps</name>
<function-clasas>webdemo3.chapter05.ELFun</function-clasas>
<function-signature>
java.lang.String processStr(java.lang.String)
</function-signature>
</function>
</taglib>
控制台错误:
java.lang.IllegalArgumentException: Can't convert argument: null
at org.apache.tomcat.util.IntrospectionUtils.convert(IntrospectionUtils.java:434)
at org.apache.tomcat.util.digester.CallMethodRule.end(CallMethodRule.java:371)
at org.apache.tomcat.util.digester.Digester.endElement(Digester.java:956)
at com.(AbstractSAXParser.java:609)
at com.(XMLDocumentFragmentScannerImpl.java:1781)
at com.(XMLDocumentFragmentScannerImpl.java:2957)
at com.(XMLDocumentScannerImpl.java:606)
at com.(XMLNSDocumentScannerImpl.java:117)
at com.(XMLDocumentFragmentScannerImpl.java:510)
at com.(XML11Configuration.java:848)
at com.(XML11Configuration.java:777)
at com.(XMLParser.java:141)
at com.(AbstractSAXParser.java:1213)
at com.(SAXParserImpl.java:649)
at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1451)
at org.apache.tomcat.util.descriptor.tld.TldParser.parse(TldParser.java:76)
at org.apache.jasper.servlet.TldScanner.scanJspConfig(TldScanner.java:198)
at org.apache.jasper.servlet.TldScanner.scan(TldScanner.java:104)
at org.apache.jasper.servlet.JasperInitializer.onStartup(JasperInitializer.java:103)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5156)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1399)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:744)
九月 09, 2015 8:39:01 下午 org.apache.catalina.core.StandardContext startInternal
严重: Error during ServletContainerInitializer processing
javax.servlet.ServletException: org.xml.sax.SAXParseException; systemId: file:/C:/apache-tomcat-8.0.23/wtpwebapps/webdemo3/WEB-INF/tld/elfun.tld; lineNumber: 15; columnNumber: 13; Error at (15, 13) : Can't convert argument: null
at org.apache.jasper.servlet.JasperInitializer.onStartup(JasperInitializer.java:105)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5156)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1399)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:744)
Caused by: org.xml.sax.SAXParseException; systemId: file:/C:/apache-tomcat-8.0.23/wtpwebapps/webdemo3/WEB-INF/tld/elfun.tld; lineNumber: 15; columnNumber: 13; Error at (15, 13) : Can't convert argument: null
at org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:1908)
at org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:1940)
at org.apache.tomcat.util.digester.Digester.endElement(Digester.java:959)
at com.(AbstractSAXParser.java:609)
at com.(XMLDocumentFragmentScannerImpl.java:1781)
at com.(XMLDocumentFragmentScannerImpl.java:2957)
at com.(XMLDocumentScannerImpl.java:606)
at com.(XMLNSDocumentScannerImpl.java:117)
at com.(XMLDocumentFragmentScannerImpl.java:510)
at com.(XML11Configuration.java:848)
at com.(XML11Configuration.java:777)
at com.(XMLParser.java:141)
at com.(AbstractSAXParser.java:1213)
at com.(SAXParserImpl.java:649)
at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1451)
at org.apache.tomcat.util.descriptor.tld.TldParser.parse(TldParser.java:76)
at org.apache.jasper.servlet.TldScanner.scanJspConfig(TldScanner.java:198)
at org.apache.jasper.servlet.TldScanner.scan(TldScanner.java:104)
at org.apache.jasper.servlet.JasperInitializer.onStartup(JasperInitializer.java:103)
... 8 more
Caused by: java.lang.IllegalArgumentException: Can't convert argument: null
at org.apache.tomcat.util.IntrospectionUtils.convert(IntrospectionUtils.java:434)
at org.apache.tomcat.util.digester.CallMethodRule.end(CallMethodRule.java:371)
at org.apache.tomcat.util.digester.Digester.endElement(Digester.java:956)
... 24 more
jsp页面错误:
HTTP Status 404 - /webdemo3/chapter5/elfun.jsp
type Status report
message /webdemo3/chapter5/elfun.jsp
description The requested resource is not available.
我找了三个例子,每个写法都不同。到底该怎么写?tld文件taglib标签属性值是不是应该会和web.xml文档中的web-app标签的属性一致?此例不一致。