zoukankan      html  css  js  c++  java
  • 自定义标签异常错误汇总

    1、未设置empty 属性

    • 错误信息:
    严重: Servlet.service() for servlet [jsp] in context with path [/web-exercise] threw exception [/paramTag.jsp (line: 11, column: 0) The TLD for the class taglibclass.QueryTag specifies an invalid body-content (JSP) for a SimpleTag.] with root cause
    org.apache.jasper.JasperException: /paramTag.jsp (line: 11, column: 0) The TLD for the class taglibclass.QueryTag specifies an invalid body-content (JSP) for a SimpleTag.	
    
    • web页面截图:

    • tld配置:

    <tag>
    		<name>paramTag</name>
    		<tag-class>taglibclass.QueryTag</tag-class>
    		 
    		<attribute>
    			<name>driver</name>
    			<required>true</required>
    			<rtexprvalue>true</rtexprvalue>
    		</attribute>
    		<attribute>
    			<name>url</name>
    			<required>true</required>
    			<rtexprvalue>true</rtexprvalue>
    		</attribute>
    		<attribute>
    			<name>username</name>
    			<required>true</required>
    			<rtexprvalue>true</rtexprvalue>
    		</attribute>
    		<attribute>
    			<name>password</name>
    			<required>true</required>
    			<rtexprvalue>true</rtexprvalue>
    		</attribute>
    		<attribute>
    			<name>sql</name>
    			<required>true</required>
    			<rtexprvalue>true</rtexprvalue>
    		</attribute>
    	</tag>
    
    • 解决方案:在tld配置文件中增加:<body-content>empty</body-content> 属性
  • 相关阅读:
    hdu 1429 胜利大逃亡(续)(BFS+位压缩)
    hdu 2955 Robberies
    POJ—Building a Space Station
    POJ-1287 Networking
    POJ-1251 Jungle Roads
    BFS ZOJ problem-1671 Waking Ant
    POJ-1308 Is It A Tree?
    poj 1611The Suspects
    POJ Wireless Network
    POJ 2524 Ubiquitous Religions
  • 原文地址:https://www.cnblogs.com/caoleiCoding/p/9130716.html
Copyright © 2011-2022 走看看