A few days ago I did the project has a download file of things let me worry about, uploaded files are not placed on the OSS server, but directly into Tomcat inside,
I want to do a direct download of a tag, the results of the open has always been said that there is no such file, I checked a lot of information found how to configure the method,
The internet is too broken, I summarize
The first step
Add uriencoding= "UTF-8" to the connector tag within the Server.xml
Name
<connector connectiontimeout= "20000" port= "8087" protocol= "http/1.1" redirectport= "8443" URIEncoding= "UTF-8"/ >
This solves the problem of Chinese
Step Two
Change the listings in the Tomcat Web. Xml to the true property (False by default)
The above two steps basically can be downloaded through the path
But I also found a few other configurations on the Internet, write it up here to make a memo.
Preparation 1
The serve modules of the server options is checked when the Tomcat interface is set
Preparation 2
Create a path in the Tomcat root directory Conf\catalina\localhost
File Smartposting.xml (project name)
<?xml version= "1.0" encoding= "UTF-8"?>
<context reloadable= "true" docbase= "smartposting" (Project name) crosscontext= "true" >
</Context>
Preparation 3
Server.xml Add in
<context docbase= "smartposting" path= "/smartposting" reloadable= "true" source= "Org.eclipse.jst.jee.server: Smartposting "/>
Within the host tag
Configuration method for downloading files from Tomcat (very full)