Hi Magnus,

I've been succesfully using a similar approach to download files from a
database and my file's size goes up to 13 Mb. The only difference I can
see is that I'm using a servlet instead of going through a Jsp page. Jsp
pages are supposed to buffer the output before sending it to the client,
in case you wanted to abort the operation and perform a forward of the
request so I guess that could explain what's happening to you. I seem to
recall having read that Jsp pages have some limitations about size, but
I don't remember exactly where. Perhaps someone else?
My question would be: Given that you are not building any html, why
don't you use a servlet? This kind of kind of program doesn't change as
often as to need automatic recompilation, you are not showing any GUI
from it, so no need for automatic translation of any HTML into
out.print(...) so is there any specific advantage about using Jsp in
this case that I'm not aware of?

Hope this helps,
Dan
PD: I don't know if it makes any difference, I don't think so, but I'm
using getBinaryStream() instead of getBytes().
-------------------------------------------
Daniel Lopez Janariz ([EMAIL PROTECTED])
Web Services
Computer Center
Balearic Islands University
-------------------------------------------

> Magn�s ��r Torfason wrote:
>
> I am using the following code in the page "image.jsp", to output an
> image from a DataBase.
>
> <img src="image.jsp">
>
> The approach works fine, except that the byte array that I get from
> the DataBase has the maximum size of 16kb (exactly
> 16384=16*1024bytes).
>
> I am using:
> MSSQL server
> IDS server for jdbc/odbc bridge
> JRun webserver (JSP 1.0)
> JDK 1.2.1
>
> The big questtion is "WHERE DOES THE FIELD GET TRUNCATED???"
>
>
> Ps.  Except for that, I find this a great way to output images from
> DBMS's, if anyone is concerned
>
>
> ***************************************
>
> <%
>         conn = java.sql.DriverManager.getConnection(dburl);
>         stmt = conn.createStatement();
>         rs = stmt.executeQuery(sqlSelect);
>         if (rs.next()) {
>             bytes = rs.getBytes("image_value");
>         }
>         if (bytes != null) {
>             response.getOutputStream().write(bytes,0,bytes.length);
>         }
> %>

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JSP-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to