zoukankan      html  css  js  c++  java
  • 作为.net程序员学jsp,伤不起



    <%@page import="java.sql.*"%>
    <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
    <%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
    + request.getServerName() + ":" + request.getServerPort()
    + path + "/";
    %>


    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <base href="<%=basePath%>">


    <title>My JSP 'dbexample1.jsp' starting page</title>


    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">
    <!--
    <link rel="stylesheet" type="text/css" href="styles.css">
    -->


    </head>
    <body>


    <%
    Class.forName("com.mysql.jdbc.Driver");
    Connection connection = DriverManager.getConnection(
    "jdbc:mysql://localhost:3306/phpcms", "root", "");
    Statement statement = connection.createStatement();
    ResultSet rs = statement
    .executeQuery("select email from v9_admin where username='phpcms'");
    while (rs.next()) {
    out.println(rs.getString(1));
    %>
    <br>
    <% } %>
























    </body>
    </html>
  • 相关阅读:
    高一下期末考试划水记
    BZOJ 1053
    积性函数与狄利克雷卷积(未完待更)
    Contest Hunter 3101
    POJ2689
    3.17爆零赛
    全概率公式
    矩阵快速幂
    模板练习
    _rqy's Code Style for OI
  • 原文地址:https://www.cnblogs.com/shugen/p/6863036.html
Copyright © 2011-2022 走看看