We have hosted a Java web application for www.domain.com on Apache & Tomcat.
I have two problems, as follows
1) Directory Index in Apache lists home.jsp ahead of redirect.jsp. For my domain.com in the web.xml, I have maintained redirect.jsp as the welcome file. However, when I visit www.domain.com, home.jsp is being rendered.
2) In an attempt to resolve problem 1 above, I maintained an entry in htaccess - DirectoryIndex redirect.jsp. Though this resolves the above problem, this creates a different problem for me, as follows.
Subdomains on domain.com need to be redirected to home.jsp of a different domain abc.com. The problem that is happening now is that when I try to access xyz.domain.com, though it is being redirected to abc.com, but the redirect.jsp page of abc.com is being rendered when actually home.jsp should be rendered. So, it seems the htaccess directory index is being carried forward to abc.com
I need to know what I am doing wrong & what is the best way to set this up on Apache & Tomcat.