1.缺少jar包,commons-lang3-3.2.jar
參考網址:https://blog.csdn.net/u013457382/article/details/50972401
2.struts.xml配置錯誤
1 <struts> 2 <package name="struts2" extends="struts-default" namespace=""> 3 <action name="userModel" class="com.ahd.action.UserModelAction"> 4 <result>/success.jsp</result> 5 </action> 6 </package> 7 </struts>
陰影部分為長出錯地方
3.web.xml檔案配置錯誤(少見)
1 <filter> 2 <filter-name>struts2</filter-name> 3 <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class> 4 </filter> 5 <filter-mapping> 6 <filter-name>struts2</filter-name> 7 <url-pattern>/*</url-pattern> 8 </filter-mapping>