You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Christopher Schultz <ch...@christopherschultz.net> on 2026/02/19 14:38:55 UTC

HTTP/2 connection and stream identifiers in Tomcat 10+

All,

Someone asked a question on SO about how to get these identifiers:
https://stackoverflow.com/questions/79850261

It looks like org.apache.coyote.streamID was replaced by 
HttpServletRequest.getProtocolRequestId but I don't see any way to get 
the connection id anymore. The constants mentioned in the docs[1] are 
just not there anymore, though they are documented to be.

I think we should definitely fix the documentation, but I wonder if we 
should restore the org.apache.coyote.connectionID attribute. Is it even 
useful to anyone, other than for protocol debugging?

-chris


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: HTTP/2 connection and stream identifiers in Tomcat 10+

Posted by Christopher Schultz <ch...@christopherschultz.net>.
Rémy,

On 2/19/26 10:05 AM, Rémy Maucherat wrote:
> On Thu, Feb 19, 2026 at 3:40 PM Christopher Schultz
> <ch...@christopherschultz.net> wrote:
>>
>> All,
>>
>> Oops, forgot the docs references:
>>
>> https://tomcat.apache.org/tomcat-10.1-doc/config/http2.html
>> https://tomcat.apache.org/tomcat-11.0-doc/config/http2.html
> 
> Ok, these are not there anymore. Tomcat 9.0 still has them of course.
> I'll fix that.

I already had a documentation fix in the works, but it looks like you 
just removed the whole section. I was thinking of being a little kinder 
to users, but I do suppose the request attribute thing was a 
Tomcat-specific hack. Reading the Migration Guide does suggest what is 
happening, but if someone were looking for that specific change they 
would not find it.

> Three methods were added in Servlet 6.0: getRequestId,
> getProtocolRequestId and getServletConnection. So the connectionID
> would be in getServletConnection.

Aha, I didn't realize that.

Thanks,
-chris

>> On 2/19/26 9:38 AM, Christopher Schultz wrote:
>>> All,
>>>
>>> Someone asked a question on SO about how to get these identifiers:
>>> https://stackoverflow.com/questions/79850261
>>>
>>> It looks like org.apache.coyote.streamID was replaced by
>>> HttpServletRequest.getProtocolRequestId but I don't see any way to get
>>> the connection id anymore. The constants mentioned in the docs[1] are
>>> just not there anymore, though they are documented to be.
>>>
>>> I think we should definitely fix the documentation, but I wonder if we
>>> should restore the org.apache.coyote.connectionID attribute. Is it even
>>> useful to anyone, other than for protocol debugging?
>>>
>>> -chris
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: dev-help@tomcat.apache.org
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: HTTP/2 connection and stream identifiers in Tomcat 10+

Posted by Rémy Maucherat <re...@apache.org>.
On Thu, Feb 19, 2026 at 3:40 PM Christopher Schultz
<ch...@christopherschultz.net> wrote:
>
> All,
>
> Oops, forgot the docs references:
>
> https://tomcat.apache.org/tomcat-10.1-doc/config/http2.html
> https://tomcat.apache.org/tomcat-11.0-doc/config/http2.html

Ok, these are not there anymore. Tomcat 9.0 still has them of course.
I'll fix that.

Three methods were added in Servlet 6.0: getRequestId,
getProtocolRequestId and getServletConnection. So the connectionID
would be in getServletConnection.

Rémy

> -chris
>
>
> On 2/19/26 9:38 AM, Christopher Schultz wrote:
> > All,
> >
> > Someone asked a question on SO about how to get these identifiers:
> > https://stackoverflow.com/questions/79850261
> >
> > It looks like org.apache.coyote.streamID was replaced by
> > HttpServletRequest.getProtocolRequestId but I don't see any way to get
> > the connection id anymore. The constants mentioned in the docs[1] are
> > just not there anymore, though they are documented to be.
> >
> > I think we should definitely fix the documentation, but I wonder if we
> > should restore the org.apache.coyote.connectionID attribute. Is it even
> > useful to anyone, other than for protocol debugging?
> >
> > -chris
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: HTTP/2 connection and stream identifiers in Tomcat 10+

Posted by Christopher Schultz <ch...@christopherschultz.net>.
All,

Oops, forgot the docs references:

https://tomcat.apache.org/tomcat-10.1-doc/config/http2.html
https://tomcat.apache.org/tomcat-11.0-doc/config/http2.html

-chris


On 2/19/26 9:38 AM, Christopher Schultz wrote:
> All,
> 
> Someone asked a question on SO about how to get these identifiers:
> https://stackoverflow.com/questions/79850261
> 
> It looks like org.apache.coyote.streamID was replaced by 
> HttpServletRequest.getProtocolRequestId but I don't see any way to get 
> the connection id anymore. The constants mentioned in the docs[1] are 
> just not there anymore, though they are documented to be.
> 
> I think we should definitely fix the documentation, but I wonder if we 
> should restore the org.apache.coyote.connectionID attribute. Is it even 
> useful to anyone, other than for protocol debugging?
> 
> -chris
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org