This week's book giveaway is in the General Computing forum.
We're giving away four copies of Emmy in the Key of Code and have Aimee Lucido on-line!
See this thread for details.
Win a copy of Emmy in the Key of Code this week in the General Computing 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
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

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
 
The fastest and most reliable components of any system are those that are not there. Tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!