I receive the following error while deploying in weblogic:
Parsing of JSP File '/pages/RegisteredEmployee.jsp' failed: /pages/RegisteredEmployee.jsp(5): 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 /pages/RegisteredEmployee.jsp line 5:
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
My struts-html.tld
is inside /WEB-INF
folder. I also tried to change the tag lib directive path to http://jakarta.apache.org/struts/tags-html
, it displayed same error. I also copied struts-html.tld
into /WEB-INF/lib
, it displayed same error.
How can I solve this problem?
RegisteredEmployee.jsp
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN" "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<html:html>
<html:form action="reg employee">
<body>
<center>
<table>
<tr>
<td>Employee Id:</td>
<td><html:text property="id"/></td>
<td><html:submit value="Login to see your details"></html:submit></td>
</tr>
</table>
</center>
</body>
</html:form>
</html:html>
web.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
<web-app>
<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>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>/pages/RegisteredEmployee.jsp</welcome-file>
</welcome-file-list>
<taglib>
<taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-html.tld</taglib-location>
</taglib>
</web-app>