使用Richfaces + Spring Webflow从文件系统显示图像

|| 我无法使用
<h:graphicImage
>标记在xhtmls中显示来自文件系统的图像。我正在使用Spring webflow 2.0和Richfaces 3.3.3 我是否应该编写一个单独的servlet来处理文件系统中的图像? 我看着
<a4j:mediaOutput
>标签。我可以用这个吗?因为createContent要求我们指定一种用于内容创建的方法。我不确定是否可以使用流变量/ bean来执行标记中的方法。     
已邀请:
您始终可以获取放置在
Web Pages
文件夹下的图像
<h:graphicImage url=\"#{facesContext.externalContext.requestContextPath}\\your_img_path_under_Web_pages\" id=\"img\" />
如果使用
<a4j:mediaOutput>
标签,则应该在createContent中提供方法以绘制图像。
  <a4j:mediaOutput element=\"img\" createContent=\"#{serviceBean.method}\" value=\"#{dataBean}\" mimeType=\"image/jpg\" />

public void userImage(OutputStream out, Object data) throws IOException {/*your method body*/}
    

要回复问题请先登录注册