2

I've apache2 and tomcat6 running on port 80 on ubuntu server 9.10. I've a registered domain name and I'll access the jsp index page navigating to http://abc.mydomain.com. The page is under tomcat_home/webapps/myapp and the below are tomcat virtual hosting in server.xml file:

<Host name="abc.mydomain.com" debug="0" appBase="webapps" unpackWARs="true">
<Logger className="org.apache.catalina.logger.FileLogger"
directory="logs" prefix="virtual_log1." suffix=".log" timestamp="true"/>
<Context path="" docBase="/usr/share/tomcat/webapps/myapps" debug="0" reloadable="true"/>
</Host>

Recently a new domain has been bought(xyz.mydomain.com) and I'm asked to do the virtual hosting so that the new domain name directly points the page "admin.jsp" which is located under 'tomcat_home/webapps/myapps/WE-INF/js/'. How could I do this?

If I type http://abc.mydomain.com/admin I'll get the page what I wanted. I should access the page just by typing http://xyz.mydomain.com.

1
  • 1
    If you find you don't get an answer here, you may want to ask this question on serverfault.com, or see if it has been asked there before. Dec 10, 2010 at 19:11

1 Answer 1

1

In web.xml in the welcome file List. Example:

<welcome-file-list>
   <welcome-file>index.jsp</welcome-file>
   <welcome-file>index.html</welcome-file>
   <welcome-file>index.htm</welcome-file>
</welcome-file-list>

Just add another line that refers to admin.jsp.

Thanks Chris

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .