Because this has been causing me so much aggravation, I went ahead & tried yet another clean install of glassfish v2.1 on a brand new Ubuntu 8.04 install... Loaded up all the webapps, directed my external IP (and thus all the DNS names for the virtual hosts) at it. STILL same exact problem reproduced. I am flabbergasted that I don't see anyone else having this same problem in my searches. Again, this all works fine on Tomcat.
Through my further hours of struggles and trying this over and over, I finally came up with just the right oddball way of steps to get it all working correctly:
1. Deployed the webapp that was to serve as the default webapp for the system FIRST.
2. Previously I was trying to create a NEW Virtual Server for this webapp and then assign this as the default VS for http-listener-1. This was not working, each time I did anywhere in the process, it would mess up other webapps resolving their VS correctly for some reason. I finally found info on a random forum that the correct way to do this is to NOT create a NEW VS for your default webapp, but just simply assign the standard "server" Virtual Server (which comes on glassfish by default) to your webapp (instead of being left blank). Did NOT touch the http-listener default VS setting this time, as doing so seemed to be a core component of what caused problems, and I had to remove ALL my webapps & VS's and start from scratch to get it working properly again(!)
3. Do NOT enter multiple hostnames in the "Hosts" field for the VS. I tried every which combination, and every time it caused similar problems by putting in anything more than one hostname per VS, would cause them not to resolve/direct correctly to the webapps (this SHOULD be fully doable!). Once I left ALL VS's at just one hostname, I was able to get it to work. To get the multiple hostnames to work otherwise as needed, I had to do some webforward trickery with our external DNS host.
4. Each time you create a VS and assign it to a webapp, REBOOT immediately afterwards. Do NOT add multiple VS's without rebooting in between each, or the same problems mentioned above will crop up.
If anyone out there has come across anything similar, or has any sort of insight, please let me know. I am highly confused by all this and not feeling too fond of glassfish at the momment (as much as I want to be!).
Thanks much,
Eric
[Message sent by forum member 'scit' (scit)]
http://forums.java.net/jive/thread.jspa?messageID=344413