I have MVC Controller as below and mapped /home
to that controller. To redirect to /home
from flow i use externalRedirect:contextRelative:/home
in view
attribute. Is possible to pass some data to /home
in POST
?
MVC Controlle开发者_如何学编程r
@Controller
public class MainController {
@RequestMapping(value="/home", method=RequestMethod.POST)
public String index(@RequestParam String data) {
return "index";
}
}
Flow
<end-state id="home" view="externalRedirect:contextRelative:/home" />
No.
When you are specifying externalRedirect:
Spring Webflow is going to set a redirect code and Location header on your response which simply instructs the browser to perform a GET request for the specified location. You can include query parameters appended to this location but not POST data.
For example:
<end-state id="home" view="externalRedirect:contextRelative:/home?foo=bar" />
Also note that you can include ${expressions} in this string that will be evaluated against the request context, according to the XSD.
精彩评论