views:

33

answers:

2

Hi, everyone,

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?

P.S can also provide some basic cmd for the Linux system?

+2  A: 

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 [email protected]" 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 [email protected]:/path/to/tomcat/dir

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

$ scp [email protected]:file.jsp /path/to/tomcat/dir
lisak
+1  A: 
scp filename.jsp username@servername:/location-of-tomcat-servlet-root
arturnt