Dynamically load pictures to prevent users from using download tools to download pictures.

xiaoxiao2021-03-06  37

<

% @ Page ContentType = "Image / JPEG"%>

<

% @ Page Import = "Java.io. *"%>

<%

DataInputStream imagedis = New DataInputStream (New FileInputStream ("E: /406988.jpg");

Try

{

IMAGEBYTE = New byte [imagedis. Available ()];

ImageDis.readfully (ImageByte);

Imagedis.close ();

ServletOutputStream Sos = response.getOutputStream ();

SOS.WRITE (ImageByte);

Sos.close ();

}

Catch (Exception E)

{}

%>

转载请注明原文地址:https://www.9cbs.com/read-58313.html

New Post(0)