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

Configuration steps for tomcat download files (details)

不言
不言forward
2018-10-10 11:31:025010browse

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>


备3
## Add

<Context docBase="SmartPosting" path="/SmartPosting" reloadable="true" source="org.eclipse.jst.jee.server:SmartPosting"/>
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!

Statement:
This article is reproduced at:cnblogs.com. If there is any infringement, please contact admin@php.cn delete