In separate Tomcat, Context can be configured in Service.xml, which means which application is given to which URL corresponds. For example: http: // localhost / ABC corresponds to a node C: KKKCBA in the file system. And in the Tomcat environment, in the WebApps directory, you placed a webApp, such as abc.war, automatically expand it into an ABC directory.
Relatively, the Tomcat integrated with JBoss is not a flexible Tomcat, because many configuration rights transferred to other configuration files of JBoss, such as conf / jboss-service.xml. Tomcat integrated with JBoss An application under JBoss, JBossWeb-Tomcat41.SAR under the deploy directory. After you enter this directory, you will find a jboss-service.xml in the meta_inf directory, carefully observe its content, and similar to SERIVE.XML of Tomcat alone. But you will find a lot of parameters is invalid, such as the Context configuration and security configuration, etc.
JBoss conf / jboss-service.xml allows you to set other release locations except for the deploy directory, and JBoss expands the WAR file is completely different, he expands to a TMP directory, and each expanded There will be changes. This approach is very inconvenient for programs that rely on the web application directory structure. For example, save users uploaded files in a fixed directory, and then access it through the file directory, it will find the situation, Because every release, the directory name is changed.
Of course, you can directly put the WAR file that has been expanded in the deploy directory, but your directory name must also end with .war.
J2EE application, you can set Context Path in Deployment Description. For example, ABC.EAR, can specify in its meta_inf directory.
It can also be seen from the app server environment, and the variables that save the context mapping are global like the environment variables in the operating system, whether you get a context through what method you have in the app server, if you have repeated, Tips or an error.