从我的操作类中获得某个 url 后,我想重定向该 url [https://api.login.yahoo.com/oauth/v2/request_auth?oauth_token=abcdefg] 并自动在浏览器中显示该 url。但是现在我收到 No Action Mapped 404 消息,尽管我从动作类正确传递了 url。
public String getMail(){
try { //some code
url = accessToken.getCallbackUrl();
if(url != null){
return "redirect";
}
return "input";
} catch (UnsupportedOperationException e) {
return "input";
}
}
<action name="getMail" method="getMail"
class="test.MailAction">
<result name="input">/index.jsp</result>
<result name="redirect" type="redirect">${url}</result>
</action>