subgonggao.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"?>
  3. <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/
  4. wml_1.1.xml">
  5. <wml> <head> <meta forua="true" http-equiv="Cache-Control" content="max-age=0"/> </head> <card id="gonggao" title="poster" newcontext="true">
  6. <p>
  7. <do type="prev" name="Prev" label="Back"><prev/></do>
  8. <%
  9. int ID=Integer.parseInt(request.getParameter("ID").toString());
  10. String sql="select * from gongbao where ID="+ID;
  11. Class.forName("org.gjt.mm.mysql.Driver").newInstance();
  12.     String url ="jdbc:mysql://127.0.0.1/gonggao?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(sql);     if(rs.next()){ %>
  16. <%=rs.getString("title")%><br/>
  17. <%=rs.getString("content")%><br/>
  18. <%}rs.close();%>          <br/><a href="index.wml">返回主页</a><br/>
  19.          </p> </card> </wml>