我正在使用struts2.0,並且應用程序在tomcat 6.0上進行了部署和測試。Struts2:從其他站點重定向到myApplication的問題
按規定,我的應用程序(爲MyApplication)具有從PHP網站與域名重定向的http:// abc.com
當這個PHP站點將請求重定向到我的應用程序調用動作動作1我的應用程序,這進一步重定向到另一個動作動作2。但重定向時,它將域名更改爲應用程序的服務器IP(http:// applicationServerIP:8080/myApplication/Action2)。我的預期結果是 (http://abc.com/myApplication/Action2)。在sturts.xml
行動的配置是:
<action name="Action1" class="Action1">
<result name="success" type="redirectAction">Action2</result>
</action>
<action name="Action2" class="Action2">
<result name="success">/myJSP.jsp</result>
</action>
任何幫助解決這一問題將不勝感激。
您好,歡迎StackOverflow上。謝謝你的回答,但更多的解釋將有助於進一步推動原始海報。請嘗試添加更多關於爲什麼您提供的代碼可解決問題的詳細信息 – 2016-06-23 16:40:14