JSP practiceProgramSerialization, because a friend recently engaged in JSP and needed some information, he collected some of the frequently used real-world JSP fragments for your reference. There are many things that can be used directly, even if you only understand a little bit of syntax, I believe that if you can focus on local serialization, it will also be a simple JSP. Thank you for your attention.
Start with login verification:
String username = NULL;
String userpasssword = NULL;
String testname = jtextfield1.gettext (). tostring ();
String testpassword = string. valueof (jtextfield2.gettext ());
String querystring = "select testname, testpassword from admin ";
Try {
Statement conn = database1.createstatement ();
Resultset rs = conn.exe cutequery (querystring );
Username = Rs. getstring ("username ");
Userpasssword = Rs. getstring ("password ");
} Catch (sqlexception ex ){
}
System. Out. println (username );
System. Out. println (userpasssword );
System. Out. println (testname );
System. Out. println (testpassword );