picring.jsp
上传用户:xiao85513
上传日期:2010-01-11
资源大小:2160k
文件大小:1k
源码类别:

手机WAP编程

开发平台:

Java

  1. <%@ page contentType="text/vnd.wap.wml" language="java" import="java.sql.*"%>
  2. <?xml version="1.0" encoding="gb2312"?>
  3. <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
  4. <wml>
  5. <head>
  6. <meta forua="true" http-equiv="Cache-Control" content="max-age=0;charset=gb2312"/>
  7. </head>
  8. <card id ="picring" title="picring">
  9. <p>
  10. <b>图铃乐园</b><br/>
  11. <%Class.forName("org.gjt.mm.mysql.Driver").newInstance();
  12.     String url ="jdbc:mysql://localhost/picring?user=nangua&password=2003herald&useUnicode=true&characterEncoding=8859_1";
  13.     Connection con= DriverManager.getConnection(url);
  14.     Statement statement=con.createStatement();
  15.     ResultSet rs=statement.executeQuery("select id,classname from bigclass");
  16.     while(rs.next()){
  17. %>
  18. <%String code=rs.getString("id");%>
  19. <a href="picringnext.jsp?big=<%=code%>"><%=rs.getString("classname")%></a><br/>
  20. <%}rs.close();%>
  21. <br/><a href="http://herald.seu.edu.cn/ewap/index.wml">返回主页</a><br/>
  22. <do type="prev" name="Prev" label="Back"><prev/></do>
  23. </p>
  24. </card>
  25. </wml>