[Java] [JBoss] Change JBoss Deployment directory (virtual directory)

Source: Internet
Author: User
Tags jboss

Original:

[Java] [JBoss] Change JBoss Deployment directory (virtual directory)

In the development process, sometimes we want to put the program in our source code directory, such as D:\code, rather than on JBoss deploy, what to do?

We know that we have Tomcat integrated in JBoss, so you can configure this directory just like Tomcat, just find the server.xml.

For different versions of JBoss, the directory name may be slightly different:

For jboss4.0, it's deploy\jbossweb-tomcat55.sar\server.xml.

For jboss4.2 is Jboss-web.deployer\server.xml,

For jboss5.1, it's jbossweb.sar\server.xml.

In short, the simplest way is to search for server.xml in the JBoss directory. After finding Server.xml, add before:



<context path= "/app" docbase= "D:\\code\myapp" debug= "1" reloadable= "true" override= "true" crosscontext= "true"/ >

Note Docbase can also be a war package:

<context path= "/app" docbase= "D:\\code\myapp.war" debug= "1" reloadable= "true" override= "true" crosscontext= "true" />



Where path is the virtual directory name, Docbase is the hard disk absolute path reloadable is reloaded when the class changes.

[Java] [JBoss] Change JBoss Deployment directory (virtual directory)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.