Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
I don't think there is direct way to assign the variable as java script executes at client side and jsp code(as a servlet) at server side. However u can assign the java script variable to a hidden form field and pass to server where the jsp can get it using request.getParameter().
I'm not sure what avina is getting at, but getParameter() will not allow you to access JavaScript variables. arul on the other hand is quite correct. Think about it for a moment. The JSP executes on the server in order to format the HTML page which is then sent to the browser wherre it (along with any JavaScript contained within) is interpreted by the browser. They live in completely separate worlds. Now, as arul pointed out, the value of the JS variable can be made available to the next JSP page by submitting it as a request parameter. hth, bear