struts taglib中的异常

时间:2012-07-19 07:18:25

标签: java-ee struts

我正在尝试运行登录页面,但获取org.apache.jasper.JasperException: Failed to load or instantiate TagExtraInfo class: org.apache.struts.taglib.logic.IterateTei

的Login.jsp

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Fetch CAMS Data and Upload it to CM</title>
</head>
<body>
<html:form action="/Login_Act">
<html:errors/>
<table width="500" align="center">
<caption>Login<br/><br/><br/><br/><br/><br/></caption>
<tr>
<td>
User Name :
</td>

<td>
<html:text property="userName" value=""/>
</td>

</tr>
<tr>
<td>
Password :
</td>

<td>
<html:password property="pwd" value=""/>
</td>

</tr>

<tr>
<td colspan="2" align="center">
<html:submit value="Login"/>

</td>

</tr>
</table>
</html:form>
</body>
</html>

我在构建路径中添加了struts.jarstruts1.4.8.jar,仍然会出错。

1 个答案:

答案 0 :(得分:2)

  • 确保struts.jar位于您的webapp的类路径中(如果它已经存在,则将其添加到WEB-INF / lib中)
  • 确保jsp-api.2.0.jar不在WEB-INF / lib