Re: Appnding session id to the URL

Splash Forums PrettyFaces Users Appnding session id to the URL Re: Appnding session id to the URL

#23323

Carolina
Member

Hi Lincoln/Christian,

I got it where the JsessionId was setting.

I debugged and the JsessionId was appending on the setting the Depart_date variable value in UrlHandlerBean.

getUrlHandlerBean().setDepart_date(FacesUtils.getFacesContext().getExternalContext().encodeActionURL((dateFormat.format(departure.getDepartDate()))));

Because of using encodeActionURL jsesionid was appending, now i am using URLEncoder.encode which solve my issue.

Thanks for your questions :) Your questions makes me alert to debug & get the solution.

JsessionId solved but every = and & is not encoding and getting %3D and %26 respectively in browser.

Getting URL in browser:

http://e125:8080/b2c/vacation-packages/%2Fb2c%2Fpages%2Fpackage%2Fflighthotel%2FflightPlusHotelResults.xhtml%3Ftrip%3DR%26origin%3DDUB%26destination%3DJED%26depart_date%3D26-12-2012%26arrival_date%3D30-12-2012%26room1%3D1A-0C-0I%26traveltype%3DI

Expecting URL:

http://e125:8080/b2c/vacation-packages/search?trip=R&origin=DUB&destination=JED&depart_date=26-12-2012&arrival_date=30-12-2012&room1=1A-0C-0I&traveltype=I