Home > Java > javaTutorial > Configuration steps for tomcat download files (details)

Configuration steps for tomcat download files (details)

不言
Release: 2018-10-10 11:31:01
forward
5021 people have browsed it

The content of this article is about the configuration method and steps of tomcat download file (details). It has certain reference value. Friends in need can refer to it. I hope it will be helpful to you.

The project I was working on a few days ago had a problem with downloading files, which troubled me a bit. The uploaded files were not placed on the OSS server, but directly placed in tomcat,

I just wanted to make a direct download with a tag, but when I opened it, it kept saying that there was no such file. I checked a lot of information and found how to configure it.

Everything on the Internet is too scattered. Let me summarize

The first step

Add URIencoding="UTF-8"# to the Connector tag in server.xml ##Full name


#This solves the problem Chinese problem

The second step

Place tomcat’s web.xml

listings Change to true attribute (default is false)

The above two steps can basically download through the path

But I also found several other configurations on the Internet, and I wrote them down here as a memo

##Note 1

When setting the tomcat interface, check the serve modules in server options

##备2

Create the path conf\Catalina\localhost in the tomcat root directoryFile SmartPosting.xml (project name)

<?xml version="1.0" encoding="UTF-8"?>
<Context  reloadable="true" docBase="SmartPosting"(项目名) crossContext="true">
</Context>
Copy after login


备3
## Add

<Context docBase="SmartPosting" path="/SmartPosting" reloadable="true" source="org.eclipse.jst.jee.server:SmartPosting"/>
Copy after login
to #server.xml and

to the Host tag.

The above is the detailed content of Configuration steps for tomcat download files (details). For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:cnblogs.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template