struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Jiang <matt.ji...@gmail.com>
Subject How to pass Result dynamic param value while using Annotation to define action
Date Wed, 04 Mar 2009 09:01:13 GMT
Hi guys,

As you can see example in http://cwiki.apache.org/WW/convention-plugin.html
You can pass static parameters to Results.
The example shows below is static String, but if I would like to use dynamic
value, such as getting value from Action. How do I write it?
Do I just use ${expression} as well?

public class HelloWorld extends ActionSupport {
  @Action(value="/different/url",
    results={@Result(name="success", type="httpheader",
params={"status", "500", "errorMessage", "Internal Error"})}

  )
  public String execute() {
    return SUCCESS;
  }
}

thanks a lot,
Matt

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message