简体   繁体   中英

How to put a .jsp file on tomcat in Linux terminal?

I want to ask a question about the tomcat and the Linux terminal. I have a jsp file and a tomcat server. After I use the terminal to login in my Linux computer, I want to put the file to the tomcat server. However, I don't know the cmd of this action. Does anyone can help me?

PS can also provide some basic cmd for the Linux system?

Do you mean a Remote linux terminal ? Do you use ssh ? Or you are sitting in front of it. If so, you type command "locate tomcat" it should print out the path, and then "cd path" as it was printed out. Then "cp /home/user/path/to/your/file.jsp ./"

But it's just a hint how to do that, not exact instructions. If it is on remote server, you need to run "$ ssh username@hostname.org" This way you can get to the remote server and copy the file from your home and do there whatever you want. Or the other way around. Copy jsp from your home and then ssh to the remote server

Copy the file "file.jsp" from the local host to a remote host

$ scp file.jsp username@remotehost.com:/path/to/tomcat/dir

Copy the file "file.jsp" from a your home to the linux host after you SSHed

$ scp username@remotehost.com:file.jsp /path/to/tomcat/dir
scp filename.jsp username@servername:/location-of-tomcat-servlet-root

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM