I believe may have the answer to this issue, or at least a workaround.
I was having the same issue on my vista desktop, but not on my vista laptop. The difference was basically the fact that the laptop is not attached to the domain, but only connected to the network, in its own workgroup.
Anyway, that might give a clue to somebody.
I followed the hosts idea, and noticed that there is an additional entry, i believe is used by IP6. That entry seems to be fooling the "localhost" match to the ip address.
So I went to my c:\windows\system32\drivers\etc\hosts file and commented changed this line:
::1 localhost
for:
#::1 localhost
This apparently ensures that the localhost alias points to the one and only 127.0.0.1
In addition, and since I am part of a network, I added the name of my pc on the network, and the fully qualified name to the 127.0.0.1 line. It ended up being something like this:
127.0.0.1 localhost myPcNetworkName myPcNetworkName.MyNetworkDnsName.FullName.comorwhatever
By the way, before doing that, try changing
http://localhost:4848/ for
http://127.0.0.1:4848/
If it works, then this tip should work for you.
Finally, this might not be the best solution, but it worked for me.
p.s. If you are also having problems with the jmx when trying to start glassfish, go to the domain.xml file and look for the tag that has the port="8686" attribute. Once there, replace the address="0.0.0.0" attribute for "localhost". That also worked for me. I saw the other day the alternative to disable it, but I found this to leave it on.
[Message sent by forum member 'sylhos' (sylhos)]
http://forums.java.net/jive/thread.jspa?messageID=303766