test.jsp
上传用户:xjrzjk
上传日期:2022-07-31
资源大小:1585k
文件大小:1k
- <%@ page contentType="text/html; charset=GBK" %>
- <%@ page import="java.sql.*"%>
- <%@ page import="javax.sql.*"%>
- <html>
- <head>
- <title>
- test
- </title>
- </head>
- <%! private int intResult = 0;
- private void doSomething(){
- System.out.println("注册成功!");
- }
- %>
- <% //this.doSomething();%>
- <body bgcolor="#ffffff">
- <h1>
- JBuilder Generated JSP
- </h1>
- <%
- try{
- // Class.forName("oracle.jdbc.driver.OracleDriver");
- // String url = "jdbc:oracle:thin:@slight:1521:LOCAL";
- // String strUser = "eshop";
- // String strPassword = "eshop";
- // Connection con = DriverManager.getConnection(url,strUser,strPassword);
- // Statement st = con.createStatement();
- // ResultSet rs = st.executeQuery("select * from Product");
- // while(rs.next()){
- // System.out.println("the resultset is : " + rs.getString("Product_Name"));
- // }
- // String strMsg = "哈哈";
- // out.println("哈哈,测试成功了!");
- // double db1 = 3.0;
- // double db2 = 2;
- // out.println("**********" + String.valueOf(4/2));
- // out.println("*************" + String.valueOf((double)4/2));
- // out.println("*************" + (3/2 == (double)3/2));
- }catch(Exception e){
- //错误处理
- throw (e);
- }
- %>
- <form name="dataform" action="test1.jsp?msg=呵呵我不知道" method="post">
- <input type="hidden" name="msg1" value="哈哈">
- <input type="button" name="button" value="通过post提交" onclick="document.dataform.submit();">
- </form>
- </body>
- </html>