网上大篇幅的坑人的struts2入门案例
Myeclipse8.5下增加struts2支持后生成的web.xml如下所示。
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<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>*.action</url-pattern>
</filter-mapping></web-app>
注意到标红的地方,网上各种搜索到的struts2入门案例都是/*
如
http://blog.csdn.net/hntyzgn2010/article/details/5547753
http://www.yiibai.com/struts2/struts2_examples.html
http://blog.csdn.net/wwwgeyang777/article/details/19078545/
http://www.jb51.net/article/72250.htm
http://www.cnblogs.com/fengmingyue/p/6117224.html
而这些教程中的/*都无法在我电脑的环境下正确的开发struts2应用,问题出在哪里呢