Skip to content

Instantly share code, notes, and snippets.

@sangramanand
Created July 31, 2012 22:49
Show Gist options
  • Save sangramanand/3221411 to your computer and use it in GitHub Desktop.
Save sangramanand/3221411 to your computer and use it in GitHub Desktop.
in Struts.xml
<action name="blog" class="com.generalsentiment.action.RedirectToBlog" method="toWPAdmin">
<result name="redirect" type="redirect">${externalUrl}</result>
</action>
package com.generalsentiment.action;
public class RedirectToBlog {
private String externalUrl;
public String getExternalUrl() {
return externalUrl;
}
public String execute() {
externalUrl = "http://blog.generalsentiment.com";
return "redirect";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment