struts+hibernate框架从数据库中读取图像文件,然后在jsp页面显示,能给个思路吗?

来源:百度知道 编辑:UC知道 时间:2024/05/31 08:17:54
有代码最好,一定追加20分

读取图片:

http://blog.csdn.net/BinTime/archive/2008/04/17/2302325.aspx

显示图片:

用response的流传递到前台,前台的<img>标记的src中写相应action的路径即可。

我知道怎么做,但是没有写好的代码

<html>
<table>
<tr>
<td>
<img scr= "Action的连接........... " > <!--图片1的连接-->
</td>
<td>
<img scr= "Action的连接........... " > <!--图片2的连接-->
</td>
<td>
<img scr= "Action的连接........... " > <!--图片3的连接-->
</td>
</tr>
</table>
<html>

mapping要对应,

action类中的处理
OracleResultSet rs = ...;