Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

GlassFish Virtual Server

 
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 www.webapp1.com

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

I create a virtual server called www.webapp1.com and set its default web application to WebApp1 and when i go to www.webapp1.com 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 www.webapp1.com/WebApp1/index.jsp. Whereas before when i hosted this on tomcat it did what i expected i.e. www.webapp1.com/index.jsp.

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 www.webapp1.com 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

Cheers,

Patrick
 
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic