-
Bug
-
Resolution: Duplicate
-
Major
-
1.1.5.Final, 1.1.8.Final
-
None
-
None
In my application, I need to redirect to another conversation.
So I do that :
@Inject private HttpConversationContext conversationContext; public void redirect() throws IOException { final ExternalContext externalContext = FacesContext.getCurrentInstance().getExternalContext(); final Map<String, List<String>> parameters = new HashMap<String, List<String>>(); final String conversationId = getConversationId(); if (conversationId != null) { parameters.put(conversationContext.getParameterName(), Arrays.asList(conversationId)); } //... put other parameters in the map externalContext.redirect(externalContext.encodeRedirectURL(externalContext.getRequestContextPath()+getViewId(), parameters)); }
(getConversationId() & getViewId() returns the cid number of the conversation I want to redirect to, and the faces viewId of my target page)
If I am in the conversation 2 & I want to redirect to conversation 1, here is the String passed to externalContext.redirect : "/mypage.xhtml?cid=1&otherparam=value"
The problem is that my browser is finally redirected to : "/mypage.xhtml?cid=2&cid=1&otherparam=value" !
I think that the problem comes from ConversationPropagationFilter.java:78 : in the FacesUrlTransformer, there is no check if in the http parameters, cid has already been specified or not.
- is related to
-
WELD-1262 ConversationPropagationFilter breaks external redirects
- Resolved