I want to use this below variable reqID into my java code, and I want to submit this prompt with this value. And that value i want to use in update.
function approveReset(){
var reqID = prompt("Enter Request ID : ", "Request ID");
<%
try{
-- Here i want to call my variable reqID--
PreparedStatement ps_approve_req = conn.prepareStatement("<Some update statement>");
}
catch (Exception e) {
System.out.println(e);
System.out.println("Some issue happened hence rolling back.");
conn.rollback();
}
%>
}
-
1What do you mean when you say: "Call my variable"?QuakeCore– QuakeCore2017年08月06日 06:34:58 +00:00Commented Aug 6, 2017 at 6:34
-
You must sent request to the server with the value in the QueryString or with request body? but how server-side can call client-side?Fady Saad– Fady Saad2017年08月06日 06:38:24 +00:00Commented Aug 6, 2017 at 6:38
-
The scriptlet will be executed on the server-side when the jsp is loaded the way you are trying to execute the scriptlet inside a javascript function won't work the way you intended.seenukarthi– seenukarthi2017年08月06日 06:41:06 +00:00Commented Aug 6, 2017 at 6:41
-
I will be calling this function by clicking on a link, so please help me how i can do this.Satender– Satender2017年08月06日 06:50:26 +00:00Commented Aug 6, 2017 at 6:50
-
My requirement is if i click on link it will prompt for request ID and with that request ID i want to update the table in DB.Satender– Satender2017年08月06日 06:51:14 +00:00Commented Aug 6, 2017 at 6:51
default