DB connection pooling webpage mistake

2005-08-11 Thread Robert Clarkson
Hi, I noticed that the code for the connection pooling had been changed, but
I can see that theres a copy and paste error here, the if statement checks
for 'ctx' being null twice, instead of checking for ds being null the second
time. As you can see in the code I copied off the page:


InitialContext cxt = new InitialContext();
if ( cxt == null ) {
   throw new Exception("Uh oh -- no context!");
}

DataSource ds = (DataSource) cxt.lookup( "java:/comp/env/jdbc/postgres" );

if ( cxt == null ) {
   throw new Exception("Data source not found!");
}


A small error, but might cause problems for people copying it. :D

Robert Clarkson
Broadmedia Technology



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



Removing the default server error pages

2005-06-15 Thread Robert Clarkson
Hi there, I am using tomcat 5.5 as an RTSP server, and I need to send
response codes back, but I do not need to send any HTML response back. I
know that I can change the response page that is returned by editing web.xml
and adding the following


 404
 /index.html


But what I need is to prevent tomcat from sending an error page altogether.
It seems to me that I could get all of the error codes to redirect to an
empty page, but this is sloppy, I would much rather change something to
prevent tomcat from sending a page back.

Any help much appreciated

Rob



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



tomcat not sending an ACK

2005-05-25 Thread Robert Clarkson
Hi,
I have been using tomcat to host my RTSP servlet, and I have written my own
connector to accept RTSP commands, the only problem is, a client which I am
writing the RTSP server for needs to receive a TCP ACK for the request it
has sent. I have used 'Etherreal' to see what is going on, and it seems that
tomcat is not sending the ACK.

I think the problem could be that there is only one request message sent in
the RTSP request, and maybe tomcat is waiting for more packets before it
sends an ACK for them all?

I tried setting keepalive to false to force an ACK, but this makes tomcat
send a FIN, which closes the TCP connection, and this is no good.

Is there a way I can force tomcat to send an ACK for each request sent?

Any help much appreciated

Thanks
Robert Clarkson



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