<img src="dbpath/0/docid/$file/attName?openElement" /> //這是圖片在前臺鏈接的地址。dbpath是數據庫的路徑,docid是文檔的id,$file是固定寫法。attName是圖片的名字。
搜索文檔中的圖片:
Vector attachs = session.evaluate("@AttachmentNames",doc);
for(String attName : attachs){
<img src="dbpath/0/docid/$file/ " + attName + " ?openElement" />
}