Change context root eclipse project

Change context root eclipse project

Context root of web based application determines which URLs server will delegate to web application. For example if web application context root is SpringMVCAjax then any request for /SpringMVCAjax or /SpringMVCAjax/* will be handled by your application unless you define specific context root. If another web application is assigned context root SpringMVCAjax/test, request for SpringMVCAjax/test/test.jsp will be handled by web application not the first one which we defined /SpringMVCAjax.

If you want to change context root of your eclipse project. Please follow steps below:

  • Right click project –> Properties
  • Click Web Project Settings –> Enter new context root name –> Click OK
  • Restart your server and try with new context root.

Change context root eclipse project

 

  • In our example new context root will be on tomcat server:  http://localhost:8080/SpringMVCAjax

Note: Sometimes it doesn’t work then go to your navigator view in eclipse –> Open file name org.eclipse.wst.common.component inside .settings folder and change deploy-name to your context name shown below:

Change context root eclipse project

 

Leave a Reply

Your email address will not be published. Required fields are marked *

I am not Robot *