just javaweb
Posted 哈哈呵
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了just javaweb相关的知识,希望对你有一定的参考价值。
<%@ page language="java" import="java.util.*" import="java.sql.*" pageEncoding="UTF-8"%> <% String driverName="com.mysql.jdbc.Driver"; String dbName="MyLogin"; String userName="root"; String userPwd="5201314"; String url1="jdbc:mysql://localhost:3306/MyLogin"; String url2="?user=root&password=5201314"; String url3="&useUnicode=true&characterEncoding=UTF-8"; String url=url1+url2+url3; Class.forName(driverName); Connection conn=DriverManager.getConnection(url); int Cname=Integer.parseInt(request.getParameter("idhao")); int Cpassword=Integer.parseInt(request.getParameter("userpassword")); String Cn="select num from checklog where id=‘"+Cname+"‘"; Statement stmt=conn.createStatement(); ResultSet rs=stmt.executeQuery(Cn); if(rs.first()){%>以上是关于just javaweb的主要内容,如果未能解决你的问题,请参考以下文章