I have two domain names that point to the same site: http://dreadedmonkeygod.net
Pretty straight forward.
However, it seems that no matter which domain the browser is requesting, my server-side code sees "www.dreadedmonkeygod.net
" in the request URL. The best place to see this in action is at http://dreadedmonkeygod.net/home/cookies.jsp
Note that even though you see "dreadedmonkeygod.net" in your browser, the JSP on the other end thinks you requested the page from www.dreadedmonkeygod.net
The code that prints out the "Request URL" on that page is as basic as you can get. It simply calls request.getRequestURL(), and prints that value.
This is making it tricky to write cookie-related code (for instance, to get my site to "remember" users that have already logged in).
Does anyone know how I can get an accurate report from the App server about what the request URL actually is?