The Httpservletrequest has a lot of properties/parts which can be questioned. Which is which, you might ask? Some blog mentions them all: https://codyburleson.com/blog/getting-parts-of-a-url-from-the-httpservletrequest-object
This is a simple blog to help me remember those cool code snippets which I used. Either by copy, or by cobbling... I do not intend this to be read by people except for me and my bad mind.