Home > Web Front-end > Vue.js > What to do if vue.js refreshes 404 page not found

What to do if vue.js refreshes 404 page not found

coldplay.xixi
Release: 2020-11-30 16:08:03
Original
3530 people have browsed it

vue.js solution to refresh 404 page not found: first unzip the package to the ROOT directory and create the [WEB-INF] directory; then enter the [WEB-INF] directory and create [web.xml ] file; finally edit [web.xml].

What to do if vue.js refreshes 404 page not found

The operating environment of this tutorial: windows10, vue2.5.2, this article is applicable to all brands of computers.

【Related article recommendations: vue.js

vue.js Solution to refresh 404 page not found:

1. Unzip the package to the ROOT directory and create the WEB-INF directory

mkdir WEB-INF
Copy after login

2. Enter the WEB-INF directory and create the web.xml file

cd WEB-INF
touch web.xml
Copy after login

3. Edit web.xml

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
           http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
  metadata-complete="true">
  <display-name>Router for Tomcat</display-name>
  <error-page>
    <error-code>404</error-code>
    <location>/index.html</location>
  </error-page>
</web-app>
Copy after login

Related free learning recommendations: JavaScript (video)

The above is the detailed content of What to do if vue.js refreshes 404 page not found. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template