users@glassfish.java.net

How to access subdomain from same port

From: <glassfish_at_javadesktop.org>
Date: Mon, 04 Jan 2010 17:09:31 PST

I have deployed an enterprise project to GF v2.1.
I have a domain abc.com and a subdomain xyz.abc.com, each of them represents a web app in the project.
abc.com is the default web module of the default virtual server 'server' where the default listeners http-listener-1, http-listener-2 are listening to.
For the subdomain xyz.abc.com I created a new virtual server 'myserver' where the default web module is xyz.abc.com web app and the following happens:

1) If http-listener-1 is the listener for 'myserver' and I try to access xyz.abc.com I get redirected to abc.com as expected.
2) If I create a new http-listener 'mylistener' that is listening to the same port as http-listener-1 GF shots down and I can't restart it until fixing the domain.xml manually.
3) Got assigned a new port by my ISP and 'mylistener' is now listening to this port; I can now access xyz.abc.com.

Now I'm wondering why Glassfish doesn't allow more than one web application without having a separate port? Or did I miss something?
[Message sent by forum member 'bardubitzki' (stephan_at_bardubitzki.com)]

http://forums.java.net/jive/thread.jspa?messageID=378732