web.xml
<resource-ref>
<description>connect mysql</description>
<res-ref-name>jdbc for mysql</res-ref-name>
<res-type>javax.sql.datasource</res-type>
<res-auth>container</res-auth>
</resource-ref>
<%@ page import="java.sql.*"%>
<%@ page import="javax.sql.*"%>
<%@ page import="javax.naming.*"%>
<%@ page session="false" %>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=gb2312">