ErrorPage中出现了The tag handler class for "s:a" (org.apache.struts2.views.jsp.ui.AnchorTag) was not found on the Java

phoenix-yang 发布于 2015/05/17 21:45
阅读 2K+
收藏 0

代码如下:

web.xml

<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_9" version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<filter>
 <filter-name>struts2</filter-name>
    <filter-class>org.apache.struts2.dispatcher.ng.filter.
    StrutsPrepareAndExecuteFilter</filter-class>
</filter>

<filter-mapping>
 <filter-name>struts2</filter-name>
  <url-pattern>/*</url-pattern>
</filter-mapping>
<welcome-file-list>
 <welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<error-page>
 <error-code>404</error-code>
 <location>/error.jsp</location>
</error-page>
</web-app>

index.jsp

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<s:a action="hello">hello</s:a>
</body>
</html>

 

error.jsp

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
     <%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
 <center>
 <h4>the page you request is not existing!</h4>
 </center>
</body>
</html>

 

最后运行中出现了这句话The tag handler class for "s:a" (org.apache.struts2.views.jsp.ui.AnchorTag) was not found on the Java
 Build Path

该怎么解决呢,请大家指点。

加载中
0
phoenix-yang
phoenix-yang
有谁能指导我啊,谢谢
0
phoenix-yang
phoenix-yang
本人新手,望指导
返回顶部
顶部