How Do I Customize a Tomcat Context Path?
When creating and deploying a Tomcat application, Tomcat configurations are required. Specifically, the default server.xml configuration is used, the context path is /, and no application path is specified.
- If Public Network Access is enabled, the application access address is http://${Public domain name of the application}:${Application access port}, for example, http://example_domain.com:30317.
- If Public Network Access is not enabled, the application access address is http://${Intranet access address of the VPC}:${Application access port}, for example, http://192.168.0.168:30317.
During the component configuration for component deployment, you can customize the application path based on the actual service when configuring Tomcat parameters.
- Select Parameter settings.
- Click Use Sample Code and edit the template file based on service requirements.
- Modify the value of Context path by referring to the following example. For example, after you change the value to app-path, the application access address is changed to http://example_domain.com:30317/app-path or http://192.168.0.168:30317/app-path.
<Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true" > <Context path="app-path" docBase="ROOT.war"/>
Application Management FAQs
- How Do I View the Causes of Application Component Deployment Failures?
- What Should I Do If I Don't See the VM Agent After Installing It?
- What Should I Do If the VM Agent Is Offline?
- What If an Instance Is Being Created for a Long Time?
- How Do I Solve the Dependency Problem When a Node Program Runs in Docker?
- How Do I Customize a Tomcat Context Path?
- How Do I Use a Fixed Application Component IP?
- What Should I Do If an ECS Error Occurs When I Create and Deploy a Component on a VM?
- What Should I Do If I Cannot Access the Port When I Create and Deploy a Component on a VM?
- Which Directories Do I Use to Write Files for VM-Deployed Application Components?
- What Should I Do If "host status is not active" Is Reported When a VM-Deployed Component Fails to Be Deleted?
- How Do I Use the ServiceStage Source Code Deployment Function?
- What Should I Do If Components Fail to Be Upgraded in ServiceStage Dark Launch?
- How Do I Mount Items to Modify the Configuration File of a Container-based Component?
- What Should I Do If the Application Name Displayed on Microservice Governance Is Different from That Displayed on ServiceStage Application Management After an Application Component Is Connected to a Microservice Engine?
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbotmore