Please refer follwoing script. What I am trying here is to build up an update based on textfield newpassword in the form. Seems the update statmt does not get constructed right. Seems many examples where we embed scriplets in form elements. Here I am creating a scriplet that refers a form element value. How I can I do that?
<%
String msg = "";
String query = "";
// Load the Oracle
JDBC driver
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
String URL= application.getInitParameter("url_path");
String user=application.getInitParameter("userid");
String pass=application.getInitParameter("passwd");
Connection conn = null;
String newpassword=request.getParameter("NewPassword");
conn = DriverManager.getConnection (URL, user, pass);
Statement stmt = conn.createStatement();
//Build the upadte string here
updatestmt = "update users set user_pass '" + %>+ document.ChangePassword.NewPassword.value + <%"' where user_name = 'tom' ";
stmt.executeUpdate(query);
%>