I have a project with "Omnifaces 3.3" and "weld.servlet.shaded 3.0.5.Final". I need to use a request parameter named "cid" in my application, but using it produces the next exception in Weld:
javax.servlet.ServletException: WELD-000321: No conversation found to restore for id 12312312
javax.faces.webapp.FacesServlet.service(FacesServlet.java:683)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
es.ine.sgtic.web.filter.SessionTimeoutFilter.doFilter(SessionTimeoutFilter.java:38)
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:109)
I'm trying to rename the parameter that uses Weld internally using the next context-param, but it doesn't work, it keeps using "cid":
servletContext.setInitParameter("WELD_CONTEXT_ID_KEY", "weldCid")
I'm using JSF 2.3 with Spring, so my beans are managed by Spring with the annotation @Component. I've seen other solutions where they Inject @Inject private HttpConversationContext conversationContext;
in an application bean, but it isn't available, and Spring doesn't find any implementation of that interface if I try to inject it in a bean.
How can I rename that parameter or get rid of it. I only use WELD in my project because Omnifaces requires it, but I don't really use anything from it.
Thanks.