Hello, in my jsp I have a
<body onload(...)> ...
and I want to send a parameter from my action
Hello, in my jsp I have a
<body onload(...)> ...
and I want to send a parameter from my action
just put your parameter in there like this:
<%= yourParameter %>
(assuming the parameter is a String or has a usable toString() method)
Your HTML syntax is wrong. It should be
<body onload="..."> ...
If you are actually passing a string parameter don't forget to quote and escape it:
<body onload="someJSFunction('<%= StringEscapeUtils.escapeJavaScript(someObject.getSomeAttribute()) >')")>