Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

A document root per virtual host

Posted on 2003-10-25
5
Medium Priority
?
989 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

-Xmx and -Xms are the two JVM options often used to tune JVM heap size.   Here are some common mistakes made when using them:   Assume BigApp is a java class file for the below examples. 1.         Missing m, M, g or G at the end …
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…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Screencast - Getting to Know the Pipeline

782 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