It took a long time for the IT novice to figure IT out, especially the first one, which he tried unsuccessfully for a long time, was to restart the Tomcat server
The first method is to modify the server.xml file in the conf directory
In & lt; Host> I’m going to add in the tag
< Context path=”/upload2″ reloadable=”true” docBase=”/test/t2″/>
Path is the path you type in the browser and DocBase is the actual path to your server folder
After the change, you need to cut back to the bin directory and restart Tomcat:
To shut down Tomcat./shutdown. Sh
Open the Tomcat./startup. Sh
FTP then forwards an image to the server’s /test/t2/ directory
In the browser through the URL access, preceded by the server public network IP or domain name
The second method: create a new configuration file in conf/Catalina/localhost (recommended)
In the/usr/local/tomcat/conf/Catalina/localhost (if the directory does not exist, create) to create a file ` upload. XML ‘
& lt; ?The XML version = “1.0” encoding = “utf-8”?>
< Context path=”/upload” reloadable=”true” docBase=”/home/admin”/>
br> N>
The fil>e and path values must be the same
This approach does not require a restart of the Tomcat server
Read More:
- Server Tomcat v8.0 Server at localhost failed to start.
- Could not publish server configuration for Tomcat v8.5 server at localhost
- [Solved] Tomcat Failed to Start Error: Server Tomcat v8.5 Server at localhost failed to start
- Tomcat start error touch under Linux
- Server Tomcat v7.0 server at localhost failed to start
- In J2EE Tomcat webapps, there are only folder directories and no files
- [Solved] IE Browser Upload Files Error: org.apache.tomcat.util.http.fileupload.FileUploadException: Stream ended unexpectedly
- Error: missing `server’ JVM at `C:\Program Files (x86)\Java\jre1.8.0_231\bin\server\jvm.dll’.
- Start tomcat server error Context initialization failed
- Removing duplicate lines from Linux shell files
- Add executable permissions to Linux files
- Grep finds all files containing a string in Linux
- Delete files with specified suffix in specified folder under Linux
- Linux configuration SFTP server
- Find files with suffix. Sh under Linux
- HTTP status 500 – internal server error (resolved) for Tomcat running project
- linux tomcat Run (DWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [debugIni)
- Linux shell RM deletes all. O suffix files in the subdirectory
- Configuring NFS server in Linux
- Tomcat error: 500 The server encountered an internal error that prevented it from fulfilling this request