try this on your jsp
<%@ page buffer="2000kb" /%>

>From: Matthew Kennedy <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: image from database servlet problem -- pooling issue?
>Date: 10 Mar 2002 02:49:01 -0600
>
>I am seeing strange behaviour with a servlet I wrote to return an image
>from a database table. I'm not sure if it's struts related or not, but I
>am relying on a datasource defined in the struts-config.xml. It might be
>a silly mistake in the servlet code itself even.
>
>I've attached the struts-config.xml which shows my datasource
>definition, the web.xml where I define the servlet and provide an
>initialization parameter, the servlet code (PhotoServlet.java) and a
>simple test.jsp page.
>
>The code I have seems to work most of the time (about 25/30 requests)
>before failing a couple of times. The log.txt attachment shows the
>result of doing:
>
>    while true
>    do
>      lwp-request \
>      'http://localhost:8080/shona/servlets/photo?id=1&class=thumbnail' \
>      | wc -c
>    done
>
>(just sequential requests)
>
>The error.txt attachment shows the exception information generated when
>a request fails. Note there seem to be two types of exceptions occuring
>here: a low level jdbc error, and a "no results returned" error.
>
>I've played with the maxCount and minCount parameters in the struts
>datasource definition. Same results, except in the case of several
>simultaneous requests to the servlet -- in which case raising maxCount
>seems to prolong the interval between exceptions.
>
>It's really been baffling me for a while now. What could be going wrong?
>Am I seeing a limitation of Struts' connection pool perhaps? Even if
>it's not struts related, suggestions would still be very welcome.
>
>Matt
><< PhotoServlet.java >>
><< error.txt >>
><< log.txt >>
><< struts-config.xml >>
><< web.xml >>
>--
>To unsubscribe, e-mail:   
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: 
><mailto:[EMAIL PROTECTED]>




_________________________________________________________________
Join the world�s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to