Solved

A document root per virtual host

Posted on 2003-10-25
5
979 Views
Last Modified: 2013-12-10
I need WAS to use one set of html/jsp files when hitting one virtual host and another set when hitting another, e.g.
www1.mydomain.com/myApp -> /www1 files
www2.myDomain.com/myApp -> /www2 files
The context root has to be identical for both, if not I'd have made two webapps with each their document root, but WAS will not accept multiple webapps with the same context root.

So the question is whether and how it is possible to deploy my application so the document root is dependent on the virtual host.

Thanks!
0
Comment
Question by:nesrohtretep
  • 3
  • 2
5 Comments
 
LVL 8

Expert Comment

by:fozylet
ID: 9623757
Inside the launch page you could check for the server address and redirect/forward accordingly.

the server address will be in the HTTP Server Variable HTTP_HOST
0
 

Author Comment

by:nesrohtretep
ID: 9623952
Yes that it possible, but I'd rather not have that logic in my application, I'd prefer to have it in the deployment information if possible. It is a plan B though.

0
 

Author Comment

by:nesrohtretep
ID: 9623969
My problem could also be solved by convincing WAS to allow two webapps with the same context root but different virtual hosts, is that possible?
0
 
LVL 8

Expert Comment

by:fozylet
ID: 9624489
Haven't tried anything like that and can't really try right now. Sorry.
0
 

Accepted Solution

by:
nesrohtretep earned 0 total points
ID: 9629515
I solved the problem.
It was caused by my virtual hosts having an overlap in the defined aliases. When I removed the overlap, WAS accepted multiple webapps with identical context roots, with each their document root.
Thanks for your suggestion fozylet
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Configure Web Service (server application) I. Configure security for Web Services methods First, we need to protect Session bean which implements the service: 1. Open EJB deployment descriptor (ejb-jar.xml) in the EJB project that contains you…
This article is about some of the basic and important steps to be used to improve the performance in web-sphere commerce application development. 1) Always leverage the Dyna-caching facility provided by the product 2) Remove the unwanted code …
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now