熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> Java編程 >> JSP教程 >> 正文

用JSP實現數據庫圖片的存儲與顯示實例[4]

2022-06-13   來源: JSP教程 

  將此文件保存為testimageoutjsp文件下一步要做的工作就是使用HTML標記

 <%@ page contentType=text/html;charset=gb%>
<%@ page import=javasql* %>
<%@ page import=javautil*%>
<%@ page import=javatext*%>
<%@ page import=javaio*%>
<jsp:useBean id=conn scope=page class=dbconnDBResult/>
<%
String path = requestgetContextPath();
String basePath = requestgetScheme()+://+requestgetServerName()+
:+requestgetServerPort()+path+/;
%>
<!DOCTYPE HTML PUBLIC //WC//DTD HTML Transitional//EN>
<html>
 <head>
  <base href=<%=basePath%>>
  <title>My JSP lookpicjsp starting page</title>
    <meta httpequiv=pragma content=nocache>
    <meta httpequiv=cachecontrol content=nocache>
    <meta httpequiv=expires content=>  
    <meta httpequiv=keywords content=keywordkeywordkeyword>
    <meta httpequiv=description content=This is my page>
    <!
    <link rel=stylesheet type=text/css href=stylescss>
    >
 </head>
 <body>
 <%
   String sql = select * from p;
   ResultSet rs=conngetResult(sql);
    while(rsnext())
    {
 %>
  <ccid_file values=testimageout % /> width= height=>
   <br>
 <%
   }
   rsclose();
 %>
</body>
</html>

[]  []  []  []  


From:http://tw.wingwit.com/Article/program/Java/JSP/201311/20708.html
    推薦文章
    Copyright © 2005-2022 電腦知識網 Computer Knowledge   All rights reserved.