问题描述
工程在本地正常运行但是放在SAE上访问就出现:HTTPERROR404Problemaccessing/.Reason:ThereisnoActionmappedfornamespace/andactionname.可是我明明没有名字为'.'的action呐,struts2.xml内容:<?xmlversion="1.0"encoding="UTF-8"?><!DOCTYPEstrutsPUBLIC"-//ApacheSoftwareFoundation//DTDStrutsConfiguration2.1//EN""http://struts.apache.org/dtds/struts-2.1.dtd"><struts><packagename="first"extends="struts-default"><actionname="test"class="action.que"><resultname="success">/show.jsp</result><resultname="success_a">/success_a.jsp</result><resultname="success_b">/success_b.jsp</result><resultname="error">/error.jsp</result><resultname="addauthor">/addauthor.jsp</result></action></package></struts>web.xml内容:<?xmlversion="1.0"encoding="UTF-8"?><web-appxmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns="http://java.sun.com/xml/ns/javaee"xsi:schemaLocation="http://java.sun.com/xml/ns/javaeehttp://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"version="3.0"><display-name>lab</display-name><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>/*</url-pattern></filter-mapping></web-app>
解决方案
解决方案二:
明白了必须手动输入需跳转的jsp页面名称