18

Could anyone answer my question, please?

I'd like to deploy a web application folder

C:\app\myapp

to Tomcat6.x instead of having a copy under

%TOMCAT_HOME%\webapps

Which configuration is required on tomcat server?

Thanks

Jonik
  • 80,077
  • 70
  • 264
  • 372
netic
  • 2,854
  • 6
  • 28
  • 25

1 Answers1

39

You should create a myapp.xml file for this app and place it in %TOMCAT_HOME%\conf\Catalina\localhost.

The file looks something like this:

<Context displayName="myapp" 
     docBase="C:/app/myapp"
     path="/myapp"
     reloadable="true" />
Kees de Kooter
  • 7,078
  • 5
  • 38
  • 45
  • 2
    That works. Thanks. Just to be more precise. context.xml should be myappname.xml, then you will be able to use http://localhost/myappname instead of http://localhost/context – netic Mar 21 '09 at 03:40
  • Caused by: java.lang.IllegalArgumentException: The main resource set specified [C:\app\myApp] is not valid What could be the reason for this error – Varun Jan 21 '19 at 13:11
  • Either use forward slashes or double `\\\` backslashes for paths in Windows. – Kees de Kooter Jan 21 '19 at 15:46