File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Other Application Frameworks and the fly likes GlassFish Virtual Server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "GlassFish Virtual Server" Watch "GlassFish Virtual Server" New topic

GlassFish Virtual Server

Patrick McDonogh
Ranch Hand

Joined: Oct 13, 2005
Posts: 89
Hi All,

I was wondering if anyone could shed some light on virtual servers on Glassfish and a Struts web application.

I have a web application called WebApp1 packaged in a war file i.e. WebApp1.war.

I have also configured a virtual host called

What i want to do is map the web domain name to my web application.

I create a virtual server called and set its default web application to WebApp1 and when i go to in a browser i can see its using the virtual server as i can see the web application( packaged in WebApp1.war).
But the url is re-written for instance index.jsp is re-written as as Whereas before when i hosted this on tomcat it did what i expected i.e.

So then i took WebApp1 off as the default web app for the virtual server on glassfish and then pointed its docroot to ${com.sun.aas.instanceRoot}/applications/j2ee-modules/WebApp1

I thought this would fix it but instead now when i go to i just get a directory listing of files.

Does anyone know how to get glassfish to configure virtual servers to a web app without having to set it as its default web app, so it doesnt put the web applications name ion the URL.

I.e. instead of www.webapp1/WebApp1/index.jsp it would be www.webapp1/index.jsp.

By the way if i go to www.webapp1/index.jsp the file still works as expected but any links in the page contain the WebApp1 i.e. www.webapp1/WebApp1/link1.jsp


I agree. Here's the link:
subject: GlassFish Virtual Server
jQuery in Action, 3rd edition