<head><script>var xxx = ${params.xxx}</script></head>
Using EL expression ${param.xxx} in <head>
to get params from a post method, and make sure the js file is included after <head>
so that you can handle a param like 'xxx' directly in your js file.