Modify Tomcat under Eclipse uriencoding to UTF-8

Source: Internet
Author: User
Tags tomcat
Problem description

In development, you need to transfer Chinese in the URL, so add the attribute to the Http1.1 port in Tomcat: uriencoding= "UTF-8". But after I modify the Server.xml file in the ". Metadata\.plugins\org.eclipse.wst.server.core" folder, once the project is re-published in Eclipse, the file is replaced and my changes disappear. Solution Solutions

Therefore, I suspect that the configuration file for a location will be replaced by ". Metadata\.plugins\org.eclipse.wst.server.core" at each eclipse release.

I first tried to re-publish the project under Eclipse after I modified the server.xml under the Tomcat main program, but the resulting configuration file was not synchronized with the configuration file in the Tomcat Master program. The result is that Eclipse uses only the executable and library files in the Tomcat Master program and does not use the configuration files in the Tomcat Master program.

Opens the Properties dialog box for the Tomcat instance created in Eclipse and does not set the URI encoding place.

There is another place to set up Tomcat, which is the configuration file in the <workspace>\servers folder. After I modify the Server.xml file in this folder, I republish the project, and the resulting configuration file is the same as the profile content in the file. The configuration files in ". Metadata\.plugins\org.eclipse.wst.server.core" are synchronized with the configuration files in the "<workspace>\servers" folder.

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.