A deep understanding of the apusicas server configuration series-configuring the web context Root

Source: Internet
Author: User

Although AAS is the most common and most implemented product, it is often used in some of the most common configuration content. In some special circumstances, it is often a bit overwhelmed. In view of this situation, it is decided to make a more in-depth study of AAS configuration files, so as to be able to maximize understanding of the practical significance of various AAS configuration files and their parameters. If possible, this series will continue until the basic introduction completes all the configurations.

In practical applications, the context root of the configuration application is the most common operation and configuration that seems to be easy to use (the requirement is to set the default application, that is, you do not need to add the Application ID and can directly access the application ). However, the configuration used in actual work is often one of many methods, and may not be the optimal method.

This document describes how to set the default application.

In fact, there are two ways to configure the application context root under AAS:

    • First, configure the apusic-application.xml File

In this way, WebLogic can also be used, but it was 8.1.x at that time. I don't know if it will continue to be supported after the upgrade to 11g.

In fact, it is very simple, you can create a META-INF directory in the Web application (War package or directory), which is the same as the WEB-INF directory, and put the apusic-application.xml file in it, you can take effect. For the content of the apusic-application.xml file, refer to the default application installed by AAS by default. Paste the following content:

<? XML version = "1.0" encoding = "UTF-8"?> <! Doctype apusic-application public '-// apusic // DTD apusic Application 3.0 // en'' http: // www.apusic.com/dtds/apusic-application_3_0.dtd'> <apusic-Application> <module uri = "public_html"> <web> <context-root>/</context-root> </Web> </module> </apusic-Application>

    • Second, add the base-context attribute to the application.

As we all know, whether it is an application detected by AAS or an application created manually or Using AAS management tools. The basic configuration information of the application is automatically added to the server. xml file under % apusic_domain_config_home %, which is generally:

 
<Application name = "appname" base = "path" Start = "Auto"/>

By default, the added application attributes are used to identify and start an application. However, in fact, the relevant attributes are rich. The context root mentioned in this Article is one of them. This attribute is named "base-context". The specific value can be set as needed. To set the default application, you can add base-context = "/".

Note: Since AAS will add a default application during installation by default, no matter which method is used to set the default application, you must adjust the "default" application installed by AAS by default. You need

 
<Context-root>/</context-root>

Make some adjustments, such

 
<Context-root>/originalapp </context-root>

This article has passed the test on apusicas 6.0 and later.

This article introduces a hidden problem of AAS, that is, the application is directly thrown to the application identified by AAS's "application_home". What is the application name? In fact, the AAS Operation Manual provides detailed instructions on this issue:

If neither base-context nor context-root is configured, apusic specifies the context root path of the Web application according to the following rules: if the application is an ear module, the URI value of the web module in the specified apusic-application.xml is the root path; if the application is a web module, the root path of the Web application is server. the Application name specified in XML, that is, the value of the "name" attribute. If the preceding value ends with ". War", the value after ". War" is removed as context-root.

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.