users@glassfish.java.net

Re: docroot of web app / mod_jk

From: <glassfish_at_javadesktop.org>
Date: Fri, 05 Jun 2009 07:29:34 PDT

Hi,

There is nothing wrong with you setting the docroot of your apache configuration to point to the directory under glassfish (i.e. applications/j2ee-modules/myapp). There is nothing says that the two systems can't both access this folder (that's the whole point of fronting with Apache).

If you have only the one application then you can use http://www.my-domain-myapp1.com to access your application (just make sure that the context-root is set to / in application.xml).

** BUT **, if you have more than one application you want to deploy then you can't do that. Because Glassfish V2.1 (and probably V3 Prelude) do not support virtual hosts properly. This means that you can have as many virtual hosts as you want, but each application has to have a unique context-root (because any application can be accessed from any virtual host, i.e. http://www.host1.com/app1 and http://www.host2.com/app1, both serve up app1 even if you configure them differently in Glassfish). This is a known issue and an enhancement request has been put in to fix this issue.

Regards.
[Message sent by forum member 'arshadm' (arshadm)]

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