1 Reply Latest reply on May 27, 2009 12:11 PM by nbelaevski

    mediaOutput and seams documentStore

    nimo22

      Hello,

      where lies the difference of rich:mediaOutput and SEAM's DocumentStore.

      I want to produce binary data(such as pdf, images, ..) via code and output it to a JSF something:

      With rich:mediaOutput, I do not need to configure the Seam's DocumentStore:

      <rich:mediaOutput value={mybinaryData} ...


      When using rich:mediaOutput, I do not need SEAM's DocumentStore, and vice versa? Am I right? Which is better? Are there any difference?


      Using Seams documentStore, I have to do some settings:

      for example:
      <document:document-store use-extensions="true" error-page="/missingDoc.seam"/>


      <servlet>
       <servlet-name>Document Store Servlet</servlet-name>
       <servlet-class>org.jboss.seam.document.DocumentStoreServlet</servlet-class>
       </servlet>
      
       <servlet-mapping>
       <servlet-name>Document Store Servlet</servlet-name>
       <url-pattern>*.pdf</url-pattern>
       </servlet-mapping>
       <servlet-mapping>
       <servlet-name>Document Store Servlet</servlet-name>
       <url-pattern>*.rtf</url-pattern>
       </servlet-mapping>


      There are no equivalent settings in rich:mediaOutput. Which one is better?


        • 1. Re: mediaOutput and seams documentStore
          nbelaevski

          a4j:mediaOutput is a component that renders placeholder tag (e.g. IMG, OBJECT, etc.) serving as frontend to RF resources framework. I guess, document store is a mechanism to store documents and then fetch it externally; so no tag is output and it uses special servlet for that.