0

After I get a certain url from my action class, I want to redirect that url [https://api.login.yahoo.com/oauth/v2/request_auth?oauth_token=abcdefg ] and show that url in browser automatically. But now I am getting No Action Mapped 404 message , although I passed url from action class correctly .

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>
kitokid
  • 3,009
  • 17
  • 65
  • 101
  • Great its possible duplicate of [http://stackoverflow.com/questions/173846/struts2-how-to-do-dynamic-url-redirects][1] [1]: http://stackoverflow.com/questions/173846/struts2-how-to-do-dynamic-url-redirects – Rais Alam Dec 13 '12 at 12:33

1 Answers1

1

I am just missing getter , setter for url. Now just works :D

public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }
kitokid
  • 3,009
  • 17
  • 65
  • 101