You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Andrew Hole <an...@gmail.com> on 2007/09/25 11:23:43 UTC
AJP connector getPort
HI!
I have a solution with an apache with mod_jk and 2 tomcat instances.
How can I know with a JSP which tomcat instance process the request?
Basically I want that my JSP show AJP connector port.
Thanks
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: AJP connector getPort
Posted by Rainer Jung <ra...@kippdata.de>.
Andrew Hole wrote:
> HI!
>
> I have a solution with an apache with mod_jk and 2 tomcat instances.
> How can I know with a JSP which tomcat instance process the request?
> Basically I want that my JSP show AJP connector port.
>
> Thanks
And now a third answer: if you really need the information in the http
response (in the page), you can either
- set jvmRoute in server.xml. If your page uses a session, the jvmRoute
will be sticked to the end of the session id, separated with a dot. To
identify the individual Server, you must use different jvmRoutes for the
servers.
- set a system property during startup. You can then output the value of
the system property in your JSP. Again they need to be different for
each instance. You can also set the jvmRoute from a system property.
Regards,
Rainer
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: AJP connector getPort
Posted by Mikolaj Rydzewski <mi...@ceti.pl>.
Andrew Hole wrote:
> I have a solution with an apache with mod_jk and 2 tomcat instances.
> How can I know with a JSP which tomcat instance process the request?
> Basically I want that my JSP show AJP connector port.
>
Use JMX to get such information.
Start JVM with following arguments
http://tomcat.apache.org/tomcat-6.0-doc/monitoring.html and then connect
to it using JConsole. You will find a lot of Tomcat's components.
--
Mikolaj Rydzewski <mi...@ceti.pl>