Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

GlassFish Virtual Server

Patrick McDonogh
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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


  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic