Why more logical?
Where do you get the session from? HttpServletRequest.getSession()
How do you get the query
string? HttpServletRequest.getQueryString()
How about all other URL/URI methods? HttpServletRequest.getRequestURL(), HttpServletRequest.getRequestURI(), etc.
How do you get cookies? HttpServletRequest.get Cookies()
Don't forget the method you are talking about are named: is
RequestedSessionIdFromURL(), is
RequestedSessionIdFromCookie().
Everything comes from the response. It looks logical to see those methods there, don't they?