With var test = "${attributename}";
is possible to get the request attribute "attributename" from javascript/jquery.
Is there a way to set a request attribute in a similar way in javascript/jquery?
With var test = "${attributename}";
is possible to get the request attribute "attributename" from javascript/jquery.
Is there a way to set a request attribute in a similar way in javascript/jquery?
set a request attribute in a similar way in javascript/jquery
NO.
Request and response available on server side ...you cannot access in javascript.
var test = "${attributename}";
resolves on compile time at server side.
You might misunderstand that jsp and javascript
existed on same document
.Yes but JSP part compiles on server side itself comes to client
.
I did'nt get your intention here, that while sending request
,set parameter
and do a request
.No matter weather it is Ajax,Html form ..etc
Your question wasn't phrased too clearly, but if you are looking to get/set the request parameters of the url... take a look at the following posts:
Get a request parameter from the current url: How can I get query string values in JavaScript?
And set a request parameter: Adding a parameter to the URL with JavaScript