Analysis of the process of deploying pure HTML files in Tomcat and WebLogic

Analysis of the process of deploying pure HTML files in Tomcat and WebLogic

1. First, the pure HTML file must have an entry index.html

2. Tomcat does not need to specify web.xml, because even if there is no web.xml in your file, it will read the web.xml in the conf directory, and the entry of index.html is specified in this file.

For Tomcat, just deploy the original file to the webapps\ directory, or create a new xml file in the \conf\Catalina\localhost directory and point it to the html page

<?xml version='1.0' encoding='utf-8'?>
  <Context docBase="C:\Users\jiashubing\Desktop\dist" 
  reloadable="false" privileged="true" antiResourceLocking="false" antiJARLocking="false">    
</Context>

3. If it is WebLogic, you can publish the war package directly, but if you want to publish a pure HTML file, you must create a new WEB-INF\web.xml file, otherwise there is no installation deployment

The writing method of web.xml file is also very simple. Pay attention to the format and do not use Chinese characters.

<web-app xmlns="http://java.sun.com/xml/ns/javaee"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
           http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
     version="3.0">

 <welcome-file-list>
  <welcome-file>index</welcome-file>
 </welcome-file-list>

 <!--Or write it in this form-->
 <!--<welcome-file-list>
   <welcome-file>index.html</welcome-file>
   <welcome-file>index.htm</welcome-file>
   <welcome-file>index.jsp</welcome-file>
 </welcome-file-list>-->

</web-app>

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

You may also be interested in:
  • How to use IDEA to create a web project and publish it to tomcat
  • How to remove the embedded Tomcat in Spring Boot and start it in a non-web way
  • Detailed explanation of the process of deploying Tomcat and creating the first web project in IDEA 2020.3.1
  • Tomcat first deployment web project process diagram
  • Solve the problem that the files under WEB-INF/classes are not compiled after tomcat releases the project
  • Solve the problem that SpringBoot webSocket resources cannot be loaded and tomcat startup errors
  • IDEA graphic tutorial on configuring Tomcat server and publishing web projects
  • Alibaba Cloud Server Linux System Builds Tomcat to Deploy Web Project
  • Briefly describe how to install Tomcat image and deploy web project in Docker
  • IDEA2020.1.2 Detailed tutorial on creating a web project and configuring Tomcat
  • How to configure Tomcat and run your first Java Web project on IntelliJ IDEA 2018
  • Idea configures tomcat to start a web project graphic tutorial
  • Java web project starts Tomcat error solution
  • Tomcat source code analysis of Web requests and processing

<<:  Detailed explanation of the use of MySQL paradigm

>>:  js to achieve simple accordion effect

Recommend

Solve the problem of installing Theano on Ubuntu 19

Solution: Directly in the directory where you dow...

Nested display implementation of vue router-view

Table of contents 1. Routing Configuration 2. Vue...

Vue Getting Started with Weather Forecast

This article example shares the specific code of ...

Sample code for partitioning and formatting a disk larger than 20TB on centos6

1. Server environment configuration: 1. Check dis...

CSS shadow animation optimization tips

This technique comes from this article - How to a...

Detailed steps to install and uninstall Apache (httpd) service on centos 7

uninstall First, confirm whether it has been inst...

mysql5.7.17.msi installation graphic tutorial

mysql-5.7.17.msi installation, follow the screens...

Detailed explanation of box-sizing in CSS3 (content-box and border-box)

Box-sizing in CSS3 (content-box and border-box) T...

Quick understanding and example application of Vuex state machine

Table of contents 1. Quick understanding of conce...

How to deploy SpringBoot project using Dockerfile

1. Create a SpringBooot project and package it in...

Delegating Privileges in Linux Using Sudo

Introduction to sudo authority delegation su swit...