users@glassfish.java.net

Re: Problem wen using "Default Web Module" & docroot

From: Jan Luehe <Jan.Luehe_at_Sun.COM>
Date: Fri, 09 Jan 2009 09:02:08 -0800

Hi Ralph,

On 01/09/09 02:14, glassfish_at_javadesktop.org wrote:
> Hi,
>
> I have a question about the usage of a "Default Web Module" in a virtual sever configuration.
> In our application we are using JavaScript Libs (TinyMCE) located in the docroot of the Server (/...domains/domain1/docroot/tinymce...)
> So inside different applications we access the scripts with root context
> script src="/tiny_mce/tiny_mce.js"
>
> Now we plan to configure one application as the "Default Web Module" of a virtual server configuration..
> But in this case the docroot is no longer accessible from a web module.
>

Yes, that is the expected behaviour: Once you've declared a web module
as a default web module,
it is going to "hijack" (or "hide") the docroot of the virtual server on
which it is deployed.
In other words, "/tiny_mce/tiny_mce.js" will now be resolved against the
docroot of the web module
that is acting as the default web module.
Once the web module is no longer declared as the default web module, the
virtual server's docroot
will "resurface".

> Can anybody help me to understand this behavior of the "Default Web Module".
>

See above. BTW, you would have the same problem if you deployed your web
module to the
root context ("/") as opposed to declaring it as a default web module.

If your goal is to share resources amongst your deployed webapps, would
using alternate docroots
(supported by GlassFish) be a possible solution?

Thanks,

Jan

> Should we better avoid using a "Default Web Module". Instead of this it would be possible changing the index.html in the docroot or changing the context root of our default webapplication?
>
> Thanks for any help and shared experience
>
> ralph
> [Message sent by forum member 'rsoika' (rsoika)]
>
> http://forums.java.net/jive/thread.jspa?messageID=324962
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>