如何在Linux终端的tomcat上放置.jsp文件?

发布于 2024-09-25 11:36:30 字数 151 浏览 0 评论 0原文

我想问一个关于tomcat和Linux终端的问题。我有一个jsp文件和一个tomcat服务器。当我使用终端登录我的Linux计算机后,我想将文件放到tomcat服务器上。但是,我不知道这个动作的命令。有人可以帮助我吗?

PS 还可以提供一些Linux系统的基本cmd吗?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

ゞ记忆︶ㄣ 2024-10-02 11:36:30

你的意思是远程linux终端吗?你使用 ssh 吗?或者你就坐在它前面。如果是这样,您输入命令“locate tomcat”,它应该打印出路径,然后输入“cd path”,因为它被打印出来。然后 "cp /home/user/path/to/your/file.jsp ./"

但这只是一个如何做到这一点的提示,而不是确切的说明。如果是在远程服务器上,则需要运行 "$ ssh [email protected ]" 这样您就可以访问远程服务器并从家里复制文件并在那里执行您想要的任何操作。或者反过来。从您的家复制 jsp,然后 ssh 到远程服务器

将文件“file.jsp”从本地主机复制到远程主机

$ scp file.jsp [email protected]:/path/to/tomcat/dir

从您的家复制文件“file.jsp” SSH 后连接到 Linux 主机

$ scp [email protected]:file.jsp /path/to/tomcat/dir

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
﹏雨一样淡蓝的深情 2024-10-02 11:36:30
scp filename.jsp username@servername:/location-of-tomcat-servlet-root
scp filename.jsp username@servername:/location-of-tomcat-servlet-root
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文