users@glassfish.java.net

Re: Default Web Module and alternatedocroot_1 virtual directory problem

From: Jan Luehe <Jan.Luehe_at_Sun.COM>
Date: Sun, 16 Aug 2009 12:39:12 -0700

On 08/14/09 22:44, glassfish_at_javadesktop.org wrote:
> I'm using Glassfish v2.1 and Eclipse 1.0.
>
> If there is no 'default web module' selected in my Virtual Server, this alternatedocroot_1 path works just fine:
>
> alternatedocroot_1 : from=/assets/* dir=J:/inetpub/wwwroot/prototype/
>
> It allows my images to be rendered using the appropriate url:
>
> http://localhost:8090/mainsite/assets/myimage.jpg
>
> They are located on disk here:
>
> J:/inetpub/wwwroot/prototype/assets/myimage.jpg
>
> My main web project set to a contextroot of '/mainsite' is here:
>
> J:/inetpub/wwwroot/prototype/mainsite
>
> When I change the 'default web module' for my virtual server to 'mainsite', however, so i can do my appropriate uri servlet filter, I would EXPECT nothing to go wrong so I SHOULD now see an image here where i need it:
>
> http://localhost:8090/assets/myimage.jpg
>
> Instead, the virtual directory stops working completely and i can't see my images anymore (anywhere?). I'm assuming changing the Default Web Root is casting some type of 'Alternate-DocRoot-with-Default-Web-Module-of-Confusion' spell on the back end that's killing the normal map to my images, but I can't figure out how to cast a counterspell. Any suggestions?
>

This should work. I'll take a look.

Once you've declared "mainsite" as the virtual server's default-web-module,
do requests for

  http://localhost:8090/mainsite/assets/myimage.jpg

still get mapped correctly to mainsite's configured alternate docroot?


Jan


> [Message sent by forum member 'twitchman' (twitchman)]
>
> http://forums.java.net/jive/thread.jspa?messageID=360587
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>