Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Redirect to another jsf application passing parameters

843844May 13 2008 — edited May 15 2008

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);
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 12 2008
Added on May 13 2008
7 comments
3,247 views