Java代码: File filePic = new File(path+"1-ab1.png"); if(filePic.exists()){ FileInputStream is = new FileInputStream(filePic); int i = is.available(); // 得到文件大小 byte data[] = new byte[i]; is.read(data); // 读数据 is.close(); response.setContentType(&q
JSP文件下载及出现getOutputStream() has already been called for this response的解决方法 http://iamin.blogdriver.com/iamin/1072546.html 一.采用RequestDispatcher的方式进行 1.web.xml文件中增加 <mime-mapping> <extension>doc</extension> <mime-type>applica
从数据库提取数据通过jstl显示在jsp页面上 1.ConnectDB.java连接数据库,把数据转换成list public class ConnectDB { private final static String strDriver = "oracle.jdbc.driver.OracleDriver"; private final static String strConnect = "jdbc:oracle:thin:@localhost:1521:ORCL&quo