<?xml?version="1.0"?encoding="UTF-8"?>
<!DOCTYPE?struts?PUBLIC
"-//Apache?Software?Foundation//DTD?Struts?Configuration?2.3//EN"
"http://struts.apache.org./dtds/struts-2.3.dtd">
<struts>
<package?name="default"?namespace="/"?extends="struts-default">
<action?name="timer"?class="com.imooc.action.TimerAction">
<result>/success.jsp</result>
</action>
</package>
</struts>?//這個(gè)是struts.xml文件
//這個(gè)是web.xml文件
<?xml?version="1.0"?encoding="UTF-8"?>
<web-app?xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"?xmlns="http://xmlns.jcp.org/xml/ns/javaee"?xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee?http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"?id="WebApp_ID"?version="3.1">
??<display-name>HelloWorld-Struts</display-name>
??<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>index.html</welcome-file>
????<welcome-file>index.htm</welcome-file>
????<welcome-file>index.jsp</welcome-file>
????<welcome-file>default.html</welcome-file>
????<welcome-file>default.htm</welcome-file>
????<welcome-file>default.jsp</welcome-file>
</web-app>
求解。。。
2016-11-28
我重啟10遍了也不行。。。而且直接在啟動(dòng)Tomcat服務(wù)器(不是在瀏覽器中運(yùn)行項(xiàng)目)的時(shí)候就已經(jīng)報(bào)錯(cuò)了。
2016-08-12
就是eclipse抽風(fēng)了。。。我重啟一遍eclipse就很神奇的好了臥槽。。。