开发者

How to redirect with params in JSF2?

开发者 https://www.devze.com 2023-03-03 16:17 出处:网络
When I enter the page I want to rediect to another page with params (f:view开发者_Python百科Param). How to do it?Add includeViewParams=true parameter to the outcome. JSF will then include the view par

When I enter the page I want to rediect to another page with params (f:view开发者_Python百科Param). How to do it?


Add includeViewParams=true parameter to the outcome. JSF will then include the view params.


Update as per the comments you seem to want to change the request/response inside the view side. This is not guaranteed to work. The view is part of the response. Once the response is committed, there is a point of no return. You cannot change the request/response to another destination.

You want to handle this in the controller instead. If those requests originate from a JSF action, then you should do the controlling job there. Just let it return the desired outcome. Or if those requests originate from external links/bookmarks/etc, then you should do the controlling job in a Filter class.

0

精彩评论

暂无评论...
验证码 换一张
取 消