Hello,
I'm newbie to JSF, so I hope to explain me almost correctly.
I have to call from a jsf page the main page of another jsf application (SecondApplication) passing some parameters.
I thought to pass them in Session. Is it possible, and how ?
What I've written is totally wrong ?
Thanks in advance for any help.
s1a2
*[FirstApplication]*
String url="http:/192.168.2.100/SecondApplication";
FacesContext fC=FacesContext.getCurrentInstance();
HttpSession session=(HttpSession)fC.getExternalContext().getSession(true);
session.setAttribute("par1","value1");
fC.getExternalContext().redirect(url);
*[SecondApplication]*
FacesContext fC=FacesContext.getCurrentInstance();
HttpSession session=(HttpSession)fC.getExternalContext().getSession(false);
String Par1=(String)session.getAttribute("par1");
System.out.println(Par1);