After Maven jetty is started, you cannot modify the static file, js,css,html

Source: Internet
Author: User

Workaround:

1. Copy a webdefault.xml file from the Jetty jar package (which may be in a different location, some jetty-web)

2. Set the Usefilemappedbuffer in Webdefault.xml to false.

<init-param>
<param-name>usefilemappedbuffer</PARAM-NAME>
<param-value>false </PARAM-VALUE>
</INIT-PARAM>

3. Place the Webdefault.xml file in the Pom sibling directory of the MAVEN Web
4. Modify the <configuration> properties in Maven, Add the following configuration in the properties

<WEBAPPCONFIG>
<contextpath>/meds</contextpath>
<defaultsdescriptor>webdefault.xml</defaultsdescriptor>
</WEBAPPCONFIG>

Note: Different versions of Jetty may not be the same configuration, may not be useful, The above configuration is useful in 9.4.1.v20170120, but may not be useful in other versions.

The static file cannot be modified after Maven jetty is started, js,css,html

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.