java.sql.SQLNonTransientConnectionException: Cannot open file:C:\Users\HARISH SHARMA\AppData\Roaming\NetBeans\8.2rc\config\GF_4.1.1\domain1/config/keystore.jks [Keystore was tampered with, or password was incorrect]
это ошибка, которую я получаю, когда нажимаю кнопку «Отправить». Я хочу вставить данные в темпе индекса формы и нажать «Отправить» на страницу go - insert
, а при открытии страницы она вставляет данные и показывает вывод. я использую mysql
для базы данных, и мой ide netbeans
.
insert. jsp
<%@page import="java.sql.*" %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>check Page</title>
</head>
<body>
<%
String na=request.getParameter("ussername");
String us=request.getParameter("UserId");
String pa=request.getParameter("Password1");
try{
Class.forName("com.mysql.jdbc.Driver");
Connection con =
DriverManager.getConnection("jdbc:mysql://localhost:3306/test","root","Harish@123");
Statement st = con.createStatement();
st.executeUpdate("insert into
test(name,userid,password)values('"+na+"','"+us+"','"+pa+"')");
out.println("inserted");
}catch(Exception e){
out.println("not inserted"+ e);
}
%>
</body>
</html>