Configuration method for downloading files from Tomcat (very full)

Source: Internet
Author: User

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)

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.