Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

byte[]ÔÚjspÒ³ÃæÏÔʾͼƬÎÊÌâ

HTML code:

<%@ page contentType="text/html; charset=GBK" language="java"%>

<%@ page import="java.io.*"%>

<html>

<body>

<form name="form" method="post">
<%
String bb = (String) request.getSession().getAttribute("content");//µÃµ½º¬ÓÐͼƬµÄ×Ö·û´®
byte[] date = bb.getBytes();
%>

<table>
<tr>
<td>
<%
response.setContentType("image/jpeg");
OutputStream toClient = response.getOutputStream();
InputStream in = new ByteArrayInputStream(date);
int len;
byte[] buf = new byte[1024];
while ((len = in.read(buf, 0, 1024)) != -1) {
toClient.write(buf, 0, len);
}
toClient.close();
%>
</td>

</tr>
</table>
</form>

</body>
</html>



ÔÚÕâ¸öjspÒ³ÃæÖУ¬ÎÒ´ÓsessionÖн«×Ö·û´®Í¼Æ¬È¡³öÀ´²¢×ª»¯Îªbyte[]Êý¾ÝÏÔʾÔÚjspÒ³ÃæÖС£ÏÖÔÚ×Ö·û´®Í¼Æ¬Êý¾ÝÒѾ­È¡³öÀ´£¬¿ÉÏÔʾͼƬµÄʱºò±¨Õâ¸ö´íÎó£º
ERROR 2009-10-13 09:55:47 org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/BOSP].[jsp] Servlet.service() for servlet jsp threw exception
java.lang.IllegalStateException: getOutputStream() has already been c


Ïà¹ØÎÊ´ð£º

JSP/Servlet½»»¥ - Java / Web ¿ª·¢

JSPÒ³ÃæÖÐÓжà¸öradio°´Å¥
  JSPÒ³Ã潫²ÎÊýPOST¸øservlet
  
  ÒªÇóÈçÏÂ;
  1.Ñ¡ÔñÒ»¸öradio£¬µ÷ÓÃservlet servletÖиù¾Ý²ÎÊýµ÷ÓÃÆäËû½Ó¿Ú£¬³ý·ÇÑ¡ÖиÃradio²¢µã»÷JSPÖеÄʵР......

JSP·­Ò³ÎÊÌâ - Java / Java EE

JSPÖÐÒª´ÓÊý¾Ý¿âÀïÃæ¶ÁÈ¡Êý¾Ý ÿҳÏÔʾ5ÌõÊý¾Ý£¬Òª½øÐз­Ò³£¬»¹Òª·µ»ØÇ°Ò»Ò³ ¸ÃÔõôʵÏÖ°¡
ÓõÄʲôÊý¾Ý¿âÄØ£¿£¿£¿

MYSQL


....лл ÎÒÏÈ¿´¿´´úÂë

http://my.donews.com/benz/2006/10/21/YnmQXKsKWNgKiTJ ......

[¼±Óð¡] JSP+AJAX ÌøתÎÊÌâ. - Web ¿ª·¢ / Ajax

ÎÊÌâ: ÏÖÔÚÌá½»Ö®ºó¾Í²»ÄÜÌøµ½ajax.jsÖÐÖ¸¶¨µÄservlet 
  ¶øÊÇÓÖÖØнøÈëµ½ÁËpub_hotel_t.jspÒ³Ãæ. Ò²¾ÍÊÇûÓÐÖ´Ðе½ajaxÀïÃæÈ¥ ´ó¼Ò°ïæ¿´¿´ÊÇʲôԭÒò°É.
  ÊDz»ÊǺÍÌá½»µÄ°´Å¦ÓйØÄ ......

jsp½ØͼÎÊÌ⣡ - Java / Web ¿ª·¢

µÚÒ»¸ö£ºjsp×ö½Øͼ¼òµ¥£¬»¹ÊÇasp×ö½Øͼ¼òµ¥£¡
µÚ¶þ¸ö£ºÎÒʹÓÃjsp½Øͼ£¬jsp½ØͼÔÚ·þÎñÆ÷¶Ë½Øͼ£¬²»ÊÇÔÚ¿Í»§¶Ë½Øͼ£¬ÎÒÒªµÄÊÇ¿Í»§¶Ë½Øͼ£¡
¾ÍÏ൱ÓëQQ½ØͼһÑù£¬½ØÍêͼ²¢°üͼƬµÄÐÅÏ¢±£´æÔÚÊý¾Ý¿âÖУ¬È»ºóÏÔʾÔÚÒ³Ãæ ......

ÈçºÎÓÃjs+jspʵÏÖË«ÖØÑ¡ÔñÏÂÀ­¿ò£¿ - Java / Web ¿ª·¢

¸÷λ´óÏÀ£¬Ð¡µÜæå¶Û£¬ÇëÈÏÕæ»Ø´ð£¡Ð»Ð»
ÓÐÁ½¸öÏÂÀ­Ñ¡Ôñ¿ò£¬µÚÒ»¸öÑ¡Ôñ´óÀ࣬µÚ¶þ¸öÑ¡ÔñСÀ࣬Á½¸öÏÂÀ­Ñ¡Ôñ¿òµÄÑ¡ÏîÈ«¶¼´ÓÊý¾Ý¿â²é³öÀ´¡£ÄÇôÔÚµÚÒ»¸öÑ¡Ôñ¿ò×ö³öÑ¡ÔñºóÈçºÎ°ÑÑ¡ÔñµÄÖµ´«¸øµÚ¶þ¸öÑ¡Ôñ¿òºÃÈõڶþ¸öÑ¡Ôñ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ