次の struts.xml があります。
<struts>
<package name="default" namespace="/view" extends="struts-portlet-default">
<action name="index" class="com.gigi.LoginAction">
<result type="redirectAction">
<param name="actionName">showAlerts</param>
<param name="namespace">/view</param>
<param name="portletMode">view</param>
</result>
<result name="error">/includes/error.jsp</result>
</action>
<action name="showAlerts" class="com.gigi.AlertsAction">
<result>/jsp/view/Alerts.jsp</result>
</action>
</package>
<package name="edit" namespace="/edit" extends="struts-portlet-default">
<action name="index" class="com.gigi.UpdateNameAction">
<result type="redirectAction">
<param name="actionName">index</param>
<param name="portletMode">view</param>
</result>
<result name="input">/jsp/edit/index.jsp</result>
</action>
</package>
</struts>
and LoginAction has the following execute method:
public String execute() throws Exception {
boolean loggedIn = checkLogin();
System.out.println("LoggedIn = " + loggedIn);
if (loggedIn) {
return SUCCESS;
}
return ERROR;
}
LoginAction から AlertsAction へのリダイレクトを試みています。jboss portal 2.7.1 でポートレットを開くたびに、次のエラーが表示されます。
要求されたリソース (/portlet/view/showAlerts) は利用できません
誰が私が間違っているのか教えてもらえますか? リダイレクトを別の方法で書いてみましたが、結果は同じです...ありがとう。