tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ALEXANDROS KOTSIRAS" <ALEXANDRO...@prodigy.net>
Subject Re: Using ResultSet object within JSP
Date Sat, 17 Jun 2000 23:53:33 GMT
Thanks for your response.
Well i realized that is't not a big issue since the client has arleady
received his/her report on the browser screen and it's OK.
So why does he/she really care whether there was an exception during the
closing of the connection when he/she is just browsing a web site  ? ?
I would only need to log it or even better send an email to the
developer(myself) since the database might soon run out of cursors if the
connections are not being  freed up.

----- Original Message -----
From: Sven van 't Veer <sven@vip.br>
To: <tomcat-user@jakarta.apache.org>
Sent: Saturday, June 17, 2000 7:18 AM
Subject: Re: Using ResultSet object within JSP


>
> >    The close() method throws SQLException and this exactly is the
problem.
> >    I don't want  try-catch within the JSP files. In general i don't want
> > methods that throw exceptions within the JSP files.
> >    Of course i can catch the SQLException within the dbClose() method
but
> > then i cannot handle it at the Browser level because i am within the
bean.
> >    Is this right ? ?
> >
> >    I hope i was clear enough.
> >    Any ideas would be appreciated.
> >
> >   Alex.
> >
> Alex,
>
> I think it was clear enough, but tell me if I'm wrong. IMHO, the best
> way to do this is within the JSP. From what I understand is that you
> want to be able to show something went wrong. So you could create an
> error.jsp, create the try/catch block and in case of an error, redirect
> to error.jsp. Another option would be to pass the response object to
> dbClose() and let the bean do the work and redirect to error.jsp or
> errorservlet in case of an exception.
>
> sven
>
> --------------------------------------------------------------------------
> To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commmands, email: tomcat-user-help@jakarta.apache.org
>


Mime
View raw message