[英]How to deploy created .jar file in Apache Tomcat server in Eclipse IDE?
[英]how to deploy Restful on Tomcat without IDE
我使用Eclipse
Maven
Tomcat7
制作了Restful
WS,现在有一个在线server
Ubuntu
, Tomcat7
装有Tomcat7
。 我需要知道的是如何在没有Eclipse
和Maven
情况下部署Restful
?
您可以使用浏览器中的管理器应用程序将war
文件部署到正在运行的Tomcat实例。 这是URL: http://your.server.intranet:8080/manager/html
(或localhost:8080
)。
配置文件$CATALINA_BASE/conf/tomcat-users.xml
包含管理员用户和管理员角色。 请参阅Configuration_Manager_Application_Access
例:
<tomcat-users xmlns="http://tomcat.apache.org/xml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://tomcat.apache.org/xml tomcat-users.xsd"
version="1.0">
<!--
NOTE: By default, no user is included in the "manager-gui" role required
to operate the "/manager/html" web application. If you wish to use this app,
you must define such a user - the username and password are arbitrary.
-->
<role rolename="manager-gui" />
<role rolename="manager-script" />
<role rolename="manager-jmx" />
<role rolename="manager-status" />
<user username="admin" password="whoknows" roles="manager-gui" />
<user username="adminScript" password="topsecret" roles="manager-script" />
</tomcat-users>
假设您的tomcat7安装目录为~/Document/tomcat7
并且您想部署MyRestful.war
MyRestful.war
复制到目录~/Document/tomcat7/webapps
~/Document/tomcat7/conf/server.xml
并找到以下行 <Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
通常端口号是8080
但值得仔细检查。
http://your.server.url:8080/MyRestful/replace-with-your-rest-api
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.