users@glassfish.java.net

Re: Blank page with a virtual host for root context

From: Wolfram Rittmeyer <w.rittmeyer_at_jsptutorial.org>
Date: Mon, 16 Feb 2009 20:17:35 +0100

Haulyn Jason wrote:
> Hi, all
>
> It's the first time for me to use Glassfish V2.1 running on slackware12.1.
>
> I create a new virtual host named sprbus.com, and configure
> www.sprbus.com,sprbus.com, then set the default web module as sprbus.war.

I suggest _not_ to use your webapp as the default webapp.

> I create sun-web.xml with context "/" and set the context to "/" with
> glassfish console.
>

This is sufficient to ensure that your webapp gets served when you enter
"www.sprbus.com".

> but, when I visit my domain: www.sprbus.com, I just got a blank page
> with nothing.

What you should do though is to select your virtual server to be
associated with this app. You can do this in the detail page of your web
app. Otherwise your app would run on every virtual server which can
cause trouble if your app locks resources (and increases startup time as
well).

>
> When I set the sprbus.war to the context:"/sprbus", and visit my domain:
> www.sprbus.com/sprbus, everything works well.
>
> Can anyone help me for this problem? I google it for a long time and
> tried many ways, but it always do not work.
>

--
Wolfram Rittmeyer