<%@ page contentType="text/html; charset=UTF-8"
%><%@ page import="java.util.*"
%><%@ page import="java.io.*"
%><%


String ls_photo = request.getParameter("ls_photo");
if(ls_photo==null || ls_photo.toUpperCase().indexOf("D:")==-1 || ls_photo.indexOf("Tomcat6_mis/webapps")==-1 || ls_photo.lastIndexOf(".gif")==-1){
	response.getWriter().write("无效的URL");
	response.flushBuffer();
	return;
}

//图片文件写入到response
	byte[] buffer = new byte[1024];
	InputStream is = null;
	try{
	if((ls_photo!=null && ls_photo!="") && ls_photo.trim().length()>0){
		is = new FileInputStream(ls_photo);	
	}else{
	    is = new FileInputStream("E:/Tomcat6_mis/webapps/jwmagic/images/hsdata/er_pic_zwtp_xz.gif");
	}
	while (is.read(buffer) >= 0) {
		response.getOutputStream().write(buffer);
	}
	}catch(Exception e){
	      is = new FileInputStream("E:/Tomcat6_mis/webapps/jwmagic/images/hsdata/er_pic_zwtp_xz.gif");
	      while (is.read(buffer) >= 0) {
		        response.getOutputStream().write(buffer);
	      }
		  System.out.println("找不到图片");
		}
	response.flushBuffer();
%>