> On 09.09.2016, at 15:59, Cheng Bao <
cb...@vmware.com> wrote:
>
> However, what to do next? without StaplerRequest and StaplerResponse parameters, after processing, how can display certain jelly file? how can I make redirection to another url?
> How can I get query parameters as /foo/bar?query=xx?
> How can I get more part of url as /foo/bar1/bar2?
The object you return can have a doIndex method, or an index.jelly view. Or, in the /foo/bar1/bar2 example, a bar2.jelly view.
I actually gave a presentation on this just a few days ago, and the recording is at
https://www.youtube.com/watch?v=iAJBKFe8mMo
You can access the current request object without changing your method signature using the static Stapler.currentRequest() method.
Likewise with the response -- you should also be able to return and/or throw a HttpResponse (there are predefined ones in HttpResponses) to redirect.
Daniel