I have a JSF 2.0 application(App#1) that has a managed Session Scoped bean that does some business logic like validation etc. After the Continue button is clicked, another plain html form page is shown to the User and clicking on Submit button on this page will submit the form to a different application (App#2). After App#2 does it's job, the User is shown a page from App#3. Please note that all of this happens in the SAME browser tab.
In the App#3 (which is also a JSF 2.0 application), I would like to remove the App#1 's session scoped bean. How do I do that? I tried the below options, but none of them seem to work.
//First approach
FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get("app1Bean");
I am getting null for the above line of code
//second approach
HttpSession session = (HttpSession) FacesContext.getCurrentInstance()
.getExternalContext().getSession(true);
session.removeAttribute("app1Bean");
Null here too.