Java tutorial
/********************************************************************* * ??? * * Apache License, Version 2.0 ???? * * http://www.apache.org/licenses/LICENSE-2.0 * ********************************************************************/ package me.leep.wf.actions; import me.leep.wf.actions.base.EditAction; import org.apache.commons.lang3.StringUtils; import org.apache.struts2.ServletActionContext; import org.apache.struts2.convention.annotation.Result; import org.apache.struts2.convention.annotation.Results; /** * @author ?? * */ @Results({ @Result(name = "result", location = "/${nextAction}", type = "redirect") }) public class EchoAction extends EditAction { /** * */ private static final long serialVersionUID = 1L; private String echo; private String nextAction; /* * ? Javadoc * * @see com.opensymphony.xwork2.ActionSupport#execute() */ @Override public String execute() throws Exception { String url = ServletActionContext.getRequest().getParameter("echo"); System.out.println(">>>>>>>>>>>>>>>>>>>>" + url); if (StringUtils.isBlank(url)) this.nextAction = "system/user-list"; else this.nextAction = "system/user-list"; // this.nextAction = url; return "result"; } /** * @return nextAction */ public String getNextAction() { return nextAction; } /** * @param nextAction * ? nextAction */ public void setNextAction(String nextAction) { this.nextAction = nextAction; } /** * @return echo */ public String getEcho() { return echo; } /** * @param echo ? echo */ public void setEcho(String echo) { this.echo = echo; } }