diff --git "a/work/com/java/minxi/java_20240605/java_2302_\345\210\230\350\264\244\345\233\275_2344310219/circle.jsp" "b/work/com/java/minxi/java_20240605/java_2302_\345\210\230\350\264\244\345\233\275_2344310219/circle.jsp" new file mode 100644 index 0000000000000000000000000000000000000000..10af21eef4d86f0ee2f45a1c15c5708a47e333b4 --- /dev/null +++ "b/work/com/java/minxi/java_20240605/java_2302_\345\210\230\350\264\244\345\233\275_2344310219/circle.jsp" @@ -0,0 +1,20 @@ +<%-- + Created by IntelliJ IDEA. + User: Administrator + Date: 2024-06-06 + Time: 19:57 + To change this template use File | Settings | File Templates. +--%> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> + + + Title + + +<% +double r=3; +out.println("面积"+3.13*r*r); +%> + + + diff --git "a/work/com/java/minxi/java_20240605/java_2302_\345\210\230\350\264\244\345\233\275_2344310219/ladder.jsp" "b/work/com/java/minxi/java_20240605/java_2302_\345\210\230\350\264\244\345\233\275_2344310219/ladder.jsp" new file mode 100644 index 0000000000000000000000000000000000000000..67aa5576ccbe333c81dd17726f4aecf0ada27f1b --- /dev/null +++ "b/work/com/java/minxi/java_20240605/java_2302_\345\210\230\350\264\244\345\233\275_2344310219/ladder.jsp" @@ -0,0 +1,24 @@ +<%-- + Created by IntelliJ IDEA. + User: Administrator + Date: 2024-06-06 + Time: 19:57 + To change this template use File | Settings | File Templates. +--%> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> + + + Title + + +<%! +double up=2; +double down=3; +double high=5; +%> +<% +out.println("面积"+(up+down)*high/2); + +%> + + diff --git "a/work/com/java/minxi/java_20240605/java_2302_\345\210\230\350\264\244\345\233\275_2344310219/main.jsp" "b/work/com/java/minxi/java_20240605/java_2302_\345\210\230\350\264\244\345\233\275_2344310219/main.jsp" new file mode 100644 index 0000000000000000000000000000000000000000..74fa7ba4e8a75acb4bba437277b5241abfb7c753 --- /dev/null +++ "b/work/com/java/minxi/java_20240605/java_2302_\345\210\230\350\264\244\345\233\275_2344310219/main.jsp" @@ -0,0 +1,23 @@ +<%-- + Created by IntelliJ IDEA. + User: Administrator + Date: 2024-06-06 + Time: 19:29 + To change this template use File | Settings | File Templates. +--%> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> + + + + Title + + + +> +
+ + + + + + diff --git "a/work/com/java/minxi/java_20240606/java_2302_\345\210\230\350\264\244\345\233\275_2344310219/index.jsp" "b/work/com/java/minxi/java_20240606/java_2302_\345\210\230\350\264\244\345\233\275_2344310219/index.jsp" new file mode 100644 index 0000000000000000000000000000000000000000..25fe536a62d7f640b937450d6111399c69d9378e --- /dev/null +++ "b/work/com/java/minxi/java_20240606/java_2302_\345\210\230\350\264\244\345\233\275_2344310219/index.jsp" @@ -0,0 +1,88 @@ +<%@ page import="com.mysql.cj.x.protobuf.MysqlxDatatypes" %> +<%@ page import="com.mysql.cj.xdevapi.Expression" %> +<%@ page import="com.mysql.cj.exceptions.ExceptionFactory" %> +<%@ page import="java.util.List" %> +<%@ page import="java.util.ArrayList" %> +<%@ page import="java.sql.Connection" %> +<%@ page import="java.sql.DatabaseMetaData" %> +<%@ page import="java.sql.Statement" %> +<%@ page import="java.sql.ResultSet" %><%-- + Created by IntelliJ IDEA. + User: Administrator + Date: 2024-06-11 + Time: 19:05 + To change this template use File | Settings | File Templates. +--%> +<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" %> + + + Title + + +<%! +public class Userinfo{ + private int id; + private MysqlxDatatypes.Scalar.String userinfo; + private MysqlxDatatypes.Scalar.String userphone; + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public MysqlxDatatypes.Scalar.String getUserinfo() { + return userinfo; + } + + public void setUserinfo(MysqlxDatatypes.Scalar.String userinfo) { + this.userinfo = userinfo; + } + + public MysqlxDatatypes.Scalar.String getUserphone() { + return userphone; + } + + public void setUserphone(MysqlxDatatypes.Scalar.String userphone) { + this.userphone = userphone; + } + + public Userinfo(int id, MysqlxDatatypes.Scalar.String userinfo, MysqlxDatatypes.Scalar.String userphone) { + this.id = id; + this.userinfo = userinfo; + this.userphone = userphone; + } + + public MysqlxDatatypes.Scalar.String Userdata(){ + return "Userinfo{" + + "id=" + id + + ", userName='" + userName + '\'' + + ", userPhone='" + userPhone + '\'' + + '}'; + } +} + +public List JDBC() throws Exception { + List userinfo1=new ArrayList<>(); + String url="jdbc:mysql://localhost:3306/student?serverTimezone=Asia/Shanghai"; + String username="root"; + String password="123456"; + + DatabaseMetaData DriverManger = null; + Connection con=DriverManger.getConnection(url,username,password); + + String sql="select id,user_name,user_phone from user_info"; + + Statement sta=con.createStatement(); + ResultSet res=sta.executeQuery(sql); + + resultSet.close(); + stmt.close(); + conn.close(); + +} +%> + +