Re: Number of AJP connections
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Lance, On 2/13/14, 10:42 AM, Campbell, Lance wrote: Thanks a lot. That was very clear. I knew the forward caused the communication to stay on the same server. But I was not clear if it communicated by calling a class/object or by going through some type of connection stream. It actually just calls a method: if you were to forward 5 times and then throw an exception, you could confirm that your stack trace gets quite long including 5 trips back through Tomcat's internals and back to your own code. The request and response objects stay the same (unless they get wrapped at some point), the data flows over the same network connection, and the whole set of 5 forwards gets processed by the same request-processor thread. But since it appears to go from one class/object to another then I won't have to change the configuration settings. Correct. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJS/nVzAAoJEBzwKT+lPKRY5JYQAJxcbSUIiXlv54jQ0dxkGLav pDkZ9DRd424RO8C0S7IEPRqAwjUBA+RwF7bX+I/ip5bOam1fiIRNJoQLXThdV7gW yio3bTJE5f5Xq4ROggQWVhJRziS53p7+a/ziOadrfVnbEpN4RwCtEyTRwjnBlCXt TpEkZxvXwytpHyJN2DkQu+rj5AMp2fgarfYwhaGAeGLF2YcyMennYpMAglgNCafn WqyRvm6v+1XzxgwSFNDBcovTORzriE12+gtUGxH7dxl9HbGVy3OY3EoDRvs3qWhE +gjxzJtYc8KTVdjlYJ0JrvdXLdduhHiHAqlS19xailo47HCrwioODvdkmCrxH+iZ e0mObIe9IRHpU3QaSejWT5NnWZcXg2RXpnMZCuHUby8yWEi6k/VFO6FZlfGiu45Y 6ZiBqaaIGZtzUZgji35/knc8ATUscXDA1tkQsm4Q3g2MWbtMdP/utSZPLvmvwdWV E1vkwK06cXd4nrnQKzmqeZQidJaRObEawD4aos/njba3F1hO+iVYhNZK7awNeoPA cbFG5AtrOehMKi/jVcJHjAiUPvg/+nlY16YCZGhKmSNNOlsXrImoqPWpnIgfGwLM mM062IKghDyUpLEOi2wos+DrthKHHrlM6tJuTbMbUoSxZ6Uwd11wp7+xKG5KcMpt jKxaZGPvNvAnwQ5q/g5j =0sql -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Number of AJP connections
Java 7 Tomcat 7 In a servlet when doing I a RequestDispatcher.forward to another servlet does this create a new Tomcat AJP connection or does it reuse the same connection ? Thanks, Lance Campbell - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Number of AJP connections
On Feb 13, 2014, at 8:25 AM, Campbell, Lance la...@illinois.edu wrote: Java 7 Tomcat 7 For future reference, please specify the full version numbers in use. In a servlet when doing I a RequestDispatcher.forward to another servlet does this create a new Tomcat AJP connection or does it reuse the same connection ? Forwards a request from a servlet to another resource (servlet, JSP file, or HTML file) on the server. http://tomcat.apache.org/tomcat-7.0-doc/servletapi/javax/servlet/RequestDispatcher.html#forward(javax.servlet.ServletRequest, javax.servlet.ServletResponse) Dan Thanks, Lance Campbell - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Number of AJP connections
Daniel Mikusa wrote: On Feb 13, 2014, at 8:25 AM, Campbell, Lance la...@illinois.edu wrote: Java 7 Tomcat 7 For future reference, please specify the full version numbers in use. In a servlet when doing I a RequestDispatcher.forward to another servlet does this create a new Tomcat AJP connection or does it reuse the same connection ? Forwards a request from a servlet to another resource (servlet, JSP file, or HTML file) on the server. http://tomcat.apache.org/tomcat-7.0-doc/servletapi/javax/servlet/RequestDispatcher.html#forward(javax.servlet.ServletRequest, javax.servlet.ServletResponse) I think that this does not really answer the OP's question, or maybe not clearly. It is a bit difficult to answer, because in fact it doesn't have anything to do with the connection, and yet.. Let's try this : - It certainly does not create a new connection, be it AJP or otherwise. - It doesn't re-use the existing connection. Its is just that the same connection continues to exist while this is taking place, and it just continues to use it to read request data from, and output response data to. - It doesn't have anything to do with the Connector through which the connection was established. - It is purely internal to the server, say like ok, I'll use that servlet code to respond to the client, instead of this one. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Number of AJP connections
On Feb 13, 2014, at 9:42 AM, André Warnier a...@ice-sa.com wrote: Daniel Mikusa wrote: On Feb 13, 2014, at 8:25 AM, Campbell, Lance la...@illinois.edu wrote: Java 7 Tomcat 7 For future reference, please specify the full version numbers in use. In a servlet when doing I a RequestDispatcher.forward to another servlet does this create a new Tomcat AJP connection or does it reuse the same connection ? Forwards a request from a servlet to another resource (servlet, JSP file, or HTML file) on the server. http://tomcat.apache.org/tomcat-7.0-doc/servletapi/javax/servlet/RequestDispatcher.html#forward(javax.servlet.ServletRequest, javax.servlet.ServletResponse) I think that this does not really answer the OP's question, or maybe not clearly. It is a bit difficult to answer, because in fact it doesn't have anything to do with the connection, and yet.. Let's try this : - It certainly does not create a new connection, be it AJP or otherwise. - It doesn't re-use the existing connection. Its is just that the same connection continues to exist while this is taking place, and it just continues to use it to read request data from, and output response data to. - It doesn't have anything to do with the Connector through which the connection was established. - It is purely internal to the server, say like ok, I'll use that servlet code to respond to the client, instead of this one.” That’s what I take as the important part here. As the JavaDoc says, it happens “on the server”. Ex: (forward) Browser - Tomcat - ServletA - [forward] - ServletB - Response This is in contrast to a redirect, which would cause the user’s browser to make a second request. Ex: (redirect) Browser - Tomcat - ServletA - [redirect] - Response (3xx) Browser - Tomcat - ServletB - Response Dan - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Number of AJP connections
Thanks a lot. That was very clear. I knew the forward caused the communication to stay on the same server. But I was not clear if it communicated by calling a class/object or by going through some type of connection stream. That was very helpful. If it had communicated on the same server via a connection stream then that meant the change I made to a servlet might need to have additional connections added to the tomcat configuration. But since it appears to go from one class/object to another then I won't have to change the configuration settings. Thanks again. Thanks, Lance Campbell Software Architect Web Services at Public Affairs 217-333-0382 -Original Message- From: André Warnier [mailto:a...@ice-sa.com] Sent: Thursday, February 13, 2014 8:42 AM To: Tomcat Users List Subject: Re: Number of AJP connections Daniel Mikusa wrote: On Feb 13, 2014, at 8:25 AM, Campbell, Lance la...@illinois.edu wrote: Java 7 Tomcat 7 For future reference, please specify the full version numbers in use. In a servlet when doing I a RequestDispatcher.forward to another servlet does this create a new Tomcat AJP connection or does it reuse the same connection ? Forwards a request from a servlet to another resource (servlet, JSP file, or HTML file) on the server. http://tomcat.apache.org/tomcat-7.0-doc/servletapi/javax/servlet/Reque stDispatcher.html#forward(javax.servlet.ServletRequest, javax.servlet.ServletResponse) I think that this does not really answer the OP's question, or maybe not clearly. It is a bit difficult to answer, because in fact it doesn't have anything to do with the connection, and yet.. Let's try this : - It certainly does not create a new connection, be it AJP or otherwise. - It doesn't re-use the existing connection. Its is just that the same connection continues to exist while this is taking place, and it just continues to use it to read request data from, and output response data to. - It doesn't have anything to do with the Connector through which the connection was established. - It is purely internal to the server, say like ok, I'll use that servlet code to respond to the client, instead of this one. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org