4

I can only access my application when I give context path like:

www.mydomain.com/projName

and not with:

www.mydomain.com

If I give www.mydomain.com, it loads tomcat application under ROOT. What change do I have to make to be able to access application without context path?

Glenn
  • 8,932
  • 2
  • 41
  • 54
Sachin
  • 449
  • 2
  • 9
  • 27
  • change the folder name to your project name. – kaysush Mar 06 '13 at 15:34
  • 1
    [HOWTO set the context path of a web application in Tomcat 7.0](http://stackoverflow.com/questions/7276989/howto-set-the-context-path-of-a-web-application-in-tomcat-7-0) – Beau Grantham Mar 06 '13 at 15:36
  • @:SuKu - I dont want context path in the URL when user first launches the application. URL should be simply "www.mydomain.com" – Sachin Mar 06 '13 at 15:37

2 Answers2

4

You can change the below in your {CATALINA_HOME}/conf/server.xml to point to your webapp,

    <Context path="" docBase="your application folder relative 
               path from webapps" debug="0"> 
    </Context>
Avinash Singh
  • 3,421
  • 2
  • 20
  • 21
0

You should provide the contents of your configuration files, specially your context.xml located in /META-INF/context.xml.

In that file, did you try to specify the context path to ""?

Something like:

<Context path=""/>

Don't forget to redeploy your solution after any change to context.xml.