/logon.jsp(2): Error in using tag library uri='/WEB-INF/struts-html.tld' prefix='html': The Tag class 'org.apache.struts.taglib.html.FormTag' has no setter method corresponding to TLD declared attribute 'name', (JSP 1.1 spec, 5.4.1)probably occurred due to an error in /logon.jsp line 2:<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
请大家帮忙分析分析到底是怎么回事情,谢过了,先!!!
7 个解决方案
#1
我试图清除了logon.jsp页面上的所有代码,结过没有报错,只要加入了包含文件struts-html.tld就出现了这个问题,不知道是怎么回事情????
#2
在web.xml文件中引入标记,例如:
<taglib>
<taglib-uri>/tags/struts-html</taglib-uri>
taglib-location>/WEB-INF/struts-html.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/tags/struts-html</taglib-uri>
taglib-location>/WEB-INF/struts-html.tld</taglib-location>
</taglib>
#3
我的web.xml中有引入啊,内容如下:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<display-name>myweb</display-name>
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>2</param-value>
</init-param>
<init-param>
<param-name>application</param-name>
<param-value>ApplicationResources</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<taglib>
<taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-html.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-template.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-template.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-tiles.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-tiles.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-nested.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-nested.tld</taglib-location>
</taglib>
</web-app>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<display-name>myweb</display-name>
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>2</param-value>
</init-param>
<init-param>
<param-name>application</param-name>
<param-value>ApplicationResources</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<taglib>
<taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-html.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-template.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-template.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-tiles.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-tiles.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-nested.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-nested.tld</taglib-location>
</taglib>
</web-app>
#4
把你的JSP贴出来看看
#5
<%@page contentType="text/html; charset=GB2312"%>
<%@ page import="database.*" %>
<%@ page import="system.*" %>
<%@ page import="system.action.*" %>
<%@ page import="system.actionForm.*" %>
<%@ page import="system.business.*" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-nested.tld" prefix="nested" %>
<%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %>
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
<html>
<head>
<title><bean:message key="system.title"/></title></head>
<body>
<br/><br/><br/><br/>
<table border="0" align="center">
<tr><td><html:errors/></td></tr>
<tr><td align="center">
<fieldset style="width:200">
<legend align="top" style="width:60"><font size="2" color="black"><b>用户登录</b></font></legend>
<html:form action="/logon.do" method="post">
<table border="0" align="center">
<tr>
<td>用户名:</td>
<td>
<html:text property="nickname" style="border-left:none; border-right:none; border-top:none; border-bottom:1 solid #000000"> </html:text>
</td>
</tr>
<tr>
<td>密 码:</td>
<td>
<html:password property="password" style="border-left:none; border-right:none; border-top:none; border-bottom:1 solid #000000"> </html:password>
</td>
</tr>
<tr>
<td colspan="2" align="center">
<html:submit value="确定" style="border:1 solid #000000"/>
<html:reset value="取消" style="border:1 solid #000000"/>
</td>
</tr>
</table>
</html:form>
</fieldset>
</td></tr></table>
</body>
</html>
<%@ page import="database.*" %>
<%@ page import="system.*" %>
<%@ page import="system.action.*" %>
<%@ page import="system.actionForm.*" %>
<%@ page import="system.business.*" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-nested.tld" prefix="nested" %>
<%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %>
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
<html>
<head>
<title><bean:message key="system.title"/></title></head>
<body>
<br/><br/><br/><br/>
<table border="0" align="center">
<tr><td><html:errors/></td></tr>
<tr><td align="center">
<fieldset style="width:200">
<legend align="top" style="width:60"><font size="2" color="black"><b>用户登录</b></font></legend>
<html:form action="/logon.do" method="post">
<table border="0" align="center">
<tr>
<td>用户名:</td>
<td>
<html:text property="nickname" style="border-left:none; border-right:none; border-top:none; border-bottom:1 solid #000000"> </html:text>
</td>
</tr>
<tr>
<td>密 码:</td>
<td>
<html:password property="password" style="border-left:none; border-right:none; border-top:none; border-bottom:1 solid #000000"> </html:password>
</td>
</tr>
<tr>
<td colspan="2" align="center">
<html:submit value="确定" style="border:1 solid #000000"/>
<html:reset value="取消" style="border:1 solid #000000"/>
</td>
</tr>
</table>
</html:form>
</fieldset>
</td></tr></table>
</body>
</html>
#6
等待中……
#7
我在tomcat4中就没有这个问题,但是当我改用weblogic8后就出现这个问题了
#1
我试图清除了logon.jsp页面上的所有代码,结过没有报错,只要加入了包含文件struts-html.tld就出现了这个问题,不知道是怎么回事情????
#2
在web.xml文件中引入标记,例如:
<taglib>
<taglib-uri>/tags/struts-html</taglib-uri>
taglib-location>/WEB-INF/struts-html.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/tags/struts-html</taglib-uri>
taglib-location>/WEB-INF/struts-html.tld</taglib-location>
</taglib>
#3
我的web.xml中有引入啊,内容如下:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<display-name>myweb</display-name>
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>2</param-value>
</init-param>
<init-param>
<param-name>application</param-name>
<param-value>ApplicationResources</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<taglib>
<taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-html.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-template.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-template.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-tiles.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-tiles.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-nested.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-nested.tld</taglib-location>
</taglib>
</web-app>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<display-name>myweb</display-name>
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>2</param-value>
</init-param>
<init-param>
<param-name>application</param-name>
<param-value>ApplicationResources</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<taglib>
<taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-html.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-template.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-template.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-tiles.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-tiles.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-nested.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-nested.tld</taglib-location>
</taglib>
</web-app>
#4
把你的JSP贴出来看看
#5
<%@page contentType="text/html; charset=GB2312"%>
<%@ page import="database.*" %>
<%@ page import="system.*" %>
<%@ page import="system.action.*" %>
<%@ page import="system.actionForm.*" %>
<%@ page import="system.business.*" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-nested.tld" prefix="nested" %>
<%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %>
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
<html>
<head>
<title><bean:message key="system.title"/></title></head>
<body>
<br/><br/><br/><br/>
<table border="0" align="center">
<tr><td><html:errors/></td></tr>
<tr><td align="center">
<fieldset style="width:200">
<legend align="top" style="width:60"><font size="2" color="black"><b>用户登录</b></font></legend>
<html:form action="/logon.do" method="post">
<table border="0" align="center">
<tr>
<td>用户名:</td>
<td>
<html:text property="nickname" style="border-left:none; border-right:none; border-top:none; border-bottom:1 solid #000000"> </html:text>
</td>
</tr>
<tr>
<td>密 码:</td>
<td>
<html:password property="password" style="border-left:none; border-right:none; border-top:none; border-bottom:1 solid #000000"> </html:password>
</td>
</tr>
<tr>
<td colspan="2" align="center">
<html:submit value="确定" style="border:1 solid #000000"/>
<html:reset value="取消" style="border:1 solid #000000"/>
</td>
</tr>
</table>
</html:form>
</fieldset>
</td></tr></table>
</body>
</html>
<%@ page import="database.*" %>
<%@ page import="system.*" %>
<%@ page import="system.action.*" %>
<%@ page import="system.actionForm.*" %>
<%@ page import="system.business.*" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-nested.tld" prefix="nested" %>
<%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %>
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
<html>
<head>
<title><bean:message key="system.title"/></title></head>
<body>
<br/><br/><br/><br/>
<table border="0" align="center">
<tr><td><html:errors/></td></tr>
<tr><td align="center">
<fieldset style="width:200">
<legend align="top" style="width:60"><font size="2" color="black"><b>用户登录</b></font></legend>
<html:form action="/logon.do" method="post">
<table border="0" align="center">
<tr>
<td>用户名:</td>
<td>
<html:text property="nickname" style="border-left:none; border-right:none; border-top:none; border-bottom:1 solid #000000"> </html:text>
</td>
</tr>
<tr>
<td>密 码:</td>
<td>
<html:password property="password" style="border-left:none; border-right:none; border-top:none; border-bottom:1 solid #000000"> </html:password>
</td>
</tr>
<tr>
<td colspan="2" align="center">
<html:submit value="确定" style="border:1 solid #000000"/>
<html:reset value="取消" style="border:1 solid #000000"/>
</td>
</tr>
</table>
</html:form>
</fieldset>
</td></tr></table>
</body>
</html>
#6
等待中……
#7
我在tomcat4中就没有这个问题,但是当我改用weblogic8后就出现这个问题了