| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 3991 人关注过本帖
标题:el静态方法错误
取消只看楼主 加入收藏
北方孤狼
Rank: 1
等 级:新手上路
帖 子:41
专家分:0
注 册:2008-5-10
结帖率:75%
收藏
 问题点数:0 回复次数:0 
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标签的属性一致?此例不一致。
搜索更多相关主题的帖子: function version 
2015-09-13 20:34
快速回复:el静态方法错误
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.027592 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved