我已经复印了样品。在Tomcat的webapps目录下,我可以访问localhost:8080。

Tomcat如何部署,需要在浏览器中打开吗?如何访问该应用程序?


当前回答

请执行以下步骤:

停止Tomcat 右键点击项目,点击“清洁和构建” 转到你的项目目录和Dist文件夹内,你会得到你复制到tomcat上的war文件 webApp目录 启动tomcat 自动战争文件提取和运行您的项目

其他回答

请执行以下步骤:

停止Tomcat 右键点击项目,点击“清洁和构建” 转到你的项目目录和Dist文件夹内,你会得到你复制到tomcat上的war文件 webApp目录 启动tomcat 自动战争文件提取和运行您的项目

In addition to the ways already mentioned (dropping the war-file directly into the webapps-directory), if you have the Tomcat Manager -application installed, you can deploy war-files via browser too. To get to the manager, browse to the root of the server (in your case, localhost:8080), select "Tomcat Manager" (at this point, you need to know username and password for a Tomcat-user with "manager"-role, the users are defined in tomcat-users.xml in the conf-directory of the tomcat-installation). From the opening page, scroll downwards until you see the "Deploy"-part of the page, where you can click "browse" to select a WAR file to deploy from your local machine. After you've selected the file, click deploy. After a while the manager should inform you that the application has been deployed (and if everything went well, started).

以下是来自Tomcat 7文档页面的更长的操作说明和其他说明。

你只需要把war文件放在webapps中,然后启动你的服务器。

它将被部署。

否则,你也可以使用tomcat管理器在webfront上远程上传和部署你的战争。

1.从应用程序生成war文件 2. 打开tomcat管理器,进入页面 3.单击browse部署战争。 4. 选择你的战争文件。 好了!

我按照下面链接的说明,它对我有用。 http://www.coderanch.com/t/487178/Tomcat/war-file-show-load

停止Tomcat 删除“tomcat/logs”目录下的所有日志和“tomcat/conf/Catalina/localhost”目录下的所有文件 从tomact/webapps中删除war文件和它创建的目录(如果有的话) 启动Tomcat 在查看日志时,再次将war文件复制到webapps目录

在此之后,请密切关注catalina.xxxx-xx-xx.log以找出问题。