WEB工程(05)

 

<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ page import="java.sql.*" %>
<%@ page import="com.mysql.jdbc.*" %>


<%

request.setCharacterEncoding("utf-8");
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>    



 
   
    
    My JSP '001.jsp' starting page
    
    
    
        
    
    
    

 
 
 
   
    
  <%
   String sql="select * from  massage";
   ResultSet rs = myjdbc01.doSelect(sql);
     out.println("

");
      out.println("");
      out.println("");
      out.println("");
    while (rs.next()) {
      out.println("");
      out.println("");
      out.println("");}
      out.println("
学号班级
");
      out.println(rs.getString(1));
      out.println("
");    
     out.println(rs.getString(2));
      out.println("
");
        
        %>
         


 

 

你可能感兴趣的:(WEB工程(05))