日期:2014-05-20 浏览次数:20780 次
<?xml version="1.0" encoding="UTF-8"?> <web-app 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.FilterDispatcher</filter-class> </filter> <filter-mapping> <filter-name>struts2</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <taglib> <taglib-uri>struts2</taglib-uri> <taglib-location>/WEB-INF/tld/struts-tags.tld</taglib-location> </taglib> </web-app>
<taglib> <taglib-uri>struts2</taglib-uri> <taglib-location>/WEB-INF/tld/struts-tags.tld</taglib-location> </taglib> 是来干嘛的?strust2不需要配置这个
------解决方案--------------------
干嘛把taglib配到web.xml里?
404一般是你的路径有问题
------解决方案--------------------
404是路径不存在
在配置文件中加上这个
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>