Tomcat cannot load the solution of static resource files such as CSS and JS _linux

Source: Internet
Author: User
There are two ways to solve the problem

One is , you use the Apache server, HTML does not give Tomcat processing, so you can not find the HTML and other static resources, so you first stop Apache, and then only to try Tomcat cat.
The second is , like me, using the Jetty development program, but when playing the war package forget to kill the Web.xml in the jetty modify the static resource code. Like the next, kill can.
Copy Code code as follows:

<servlet>
<servlet-name>default</servlet-name>
<!--<servlet-class>org.mortbay.jetty.servlet.DefaultServlet</servlet-class>-->
<servlet-class>
Org.eclipse.jetty.servlet.DefaultServlet
</servlet-class>
<init-param>
<param-name>useFileMappedBuffer</param-name>
<param-value>false</param-value>
</init-param>
<load-on-startup>0</load-on-startup>
</servlet>

Did not kill this paragraph before, the appearance is such nausea:

After killing the jetty configuration, it becomes the following, haha!!
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.