Get a variable from javascript to another jsp
===

I have a javascript function.Suppose I have a variable 
string `var val = "currentUrlOfThisPage";` I need to get this variable to another jsp page. Is there any way to do that? 
My requirement:
I need the url of a one jsp page where I am clicking button ,to another jsp.