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>
  • 相关阅读:
    Java提高学习之Object(5)
    cmd命令。
    CacheView。
    快速界面:QML。
    抓包工具。
    打包安装程序。
    AS:加载新版本的SWF文件。
    as自定义菜单。
    as [Frame]元标签
    转载:Flash AS3.0 加载外部资源(图片,MP3,SWF)的两种方式
  • 原文地址:https://www.cnblogs.com/shugen/p/6863036.html
Copyright © 2011-2022 走看看