Announcement Announcement Module
Collapse
No announcement yet.
Blob Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Blob

    Hi All

    In the spring reference documentation there is a section on handling BLOB and CLOB.

    When it was read from the database it used List. But how can I convert
    this list to image file?

    Any help will be greatly appreciated

    Thanks

  • #2
    I have the same question, can the ResourceServlet be used to acomplish that?

    I mean to serve a binary stream as a link for use with images tags .. ??

    Comment


    • #3
      <img src="URL" />
      URL can point to servlet, for example, DispatcherServlet.
      Then it is possible to implement Controller, which will get blob stream and copy it to ServletOutputStream.

      LobHandler#getBlobAsBinaryStream(ResultSet rs, String columnName)
      commons-io IOUtils#copy(InputStream input, OutputStream output)

      Comment


      • #4
        Sorry i'm still a little lost..

        you said I can use the dispacherServlet, the one from the ...

        <!-- Map all /spring requests to the Dispatcher Servlet for handling -->
        <servlet-mapping>
        <servlet-name>Spring MVC Dispatcher Servlet</servlet-name>
        <url-pattern>/spring/*</url-pattern>
        </servlet-mapping>

        then... how can I make a controller respond to a request made to the Dispatcher Servlet ?

        (I'm using SWF without spring mvc... that's why I have no clue about it..)

        Comment


        • #5
          Nevermind,

          I think I'm getting to undrestand how it works...

          thanks a lot

          Comment


          • #6
            You can use any servlet. I mentioned DispatcherServlet in case if you use Spring MVC.

            Comment

            Working...
            X