tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alessandro Vernet <>
Subject Re: request.getServerPort() returns wrong port when using tcpmon
Date Fri, 02 Feb 2007 00:15:54 GMT

Alessandro Vernet wrote:
> When the request I send to Tomcat go through tcpmon, calls to
> httpServletRequest.getServerPort() in my code always return 80. This is
> incorrect, as Tomcat is listening in fact to port 8080. I don't have this
> problem when request don't do through tcpmon.

I found the reason for this behavior. It is quite simple actually: I am
using Axis tcpmon packaged as a plug-in for IntelliJ
(, and that version
of tcpmon always sends Host: localhost, instead of Host: localhost:8080 when
it forwards the request to port 8080.

Other versions of tcpmon (like this one: send
a Host header with a correct port. So it just looks like a bug in that
IntelliJ's plug-in.

Orbeon Forms - Web Forms for the Enterprise, Done the Right Way

View this message in context:
Sent from the Tomcat - User mailing list archive at

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message