OK. But then how do I see JSESSIONID appended to the URL. I wish to use the method "encodeURL()" so I could understand how it works and when to use it.
I changed the code but still it shows a blank page
I thought I could use "encodeURL()" after disabling the cookies on the browser as "encodeURL()" adds "jsessionid" at the end of the URL if the cookies are disabled.
Your redirect URL is page-relative. Bad idea. For a redirect you need to use a server-relative URL if the path is on the same server, or an absolute path if on a different server.
Look at it from the point of view of the container: with the scant information you've given it -- just a page name -- how is it supped to find it? It's like saying "Where does Ralph live?" with the answer "In a blue house". Good luck finding Ralph.