1

I don't know I am asking correct question or not (may be its silly).

Suppose I am having tomcat installed on dir c:\Apache\Tomcat 7.0\.. with some web applications in it and now I wanted to deploy another application (war) but I don't want to keep my web application on location c:\Apache\Tomcat 7.0\webppas\{myapplicationDir} I wanted to deploy on suppose D:\{applicationDir}

Is it possible? If yes then is it there any kind of problem that I gonna face.

Amogh
  • 4,453
  • 11
  • 45
  • 106
  • Its possible, i've seen it implemented that way, but not sure how though.. i've only seen that hey have to create a configuration file within conf/Catalina/localhost to set the real directory there.. sorry i couldnt help much. – Ed Morales Jun 27 '14 at 10:44

2 Answers2

1

Its very possible, you can define the base in the configuration file for each webapp. These configuration files for you would be located in the c:\Apache\Tomcat 7.0\conf\Catalina\localhost directory. The config file should be named {APP_NAME}.xml, so you might have ROOT.xml

Heres what one of mine looks like for a project I have in Eclipse

<?xml version="1.0" encoding="UTF-8"?>
<Context docBase="C:\workdir\test\dev\web\src\main\webapp" path="/"/>
ug_
  • 11,267
  • 2
  • 35
  • 52
0

Yes, you can. its all about the container and context.

http://tomcat.apache.org/tomcat-7.0-doc/config/context.html I dont think there should be problems with this approach infact it is better to move out things from server.xml.

Satz
  • 16
  • 1