简体   繁体   English

在Tomcat6中部署Webapp

[英]Deploying webapp in Tomcat6

I have the following problem. 我有以下问题。 When I developed my application locally I was deploying it using Netbeans support. 在本地开发应用程序时,我是使用Netbeans支持进行部署的。 Now I need to deploy the application on the official server. 现在,我需要在官方服务器上部署该应用程序。 I installed Tomcat6 and it displays the start page properly but how to deploy my app? 我安装了Tomcat6,它正确显示了起始页,但是如何部署我的应用程序? Which changes are needed to make ot work on port 80 (at the moment it works on default 8080)? 为了使ot在端口80上工作(当前在默认8080上工作),需要进行哪些更改? Where should I copy the files from my application? 我应该在哪里从应用程序复制文件? Thanks a lot for helping me out. 非常感谢您的帮助。 Links to similar posts are also appreciated. 链接到类似的帖子也将不胜感激。 I could not find any that would help me tough. 我找不到任何可以帮助我克服困难的东西。

how to deploy my app 如何部署我的应用

Netbeans on build operation creates a war file in dist folder. Netbeans在构建操作上会在dist文件夹中创建一个war文件。 See a question about it here. 在此处查看有关此问题的信息。 You will need to take this war file and: 您将需要获取此战争文件,并:

Where should I copy the files from my application? 我应该在哪里从应用程序复制文件?

put it under webapp folder in tomcat. 将其放在tomcat的webapp文件夹下。 The location is your tomcat_home folder->webapps. 该位置是您的tomcat_home文件夹-> webapps。

Which changes are needed to make to work on port 80 要在端口80上工作,需要进行哪些更改

under your tomcat_home folder, open conf folder. 在您的tomcat_home文件夹下,打开conf文件夹。 Inside, find server.xml file. 在里面,找到server.xml文件。 open it with notepad and change the port number from 8080 to 80: 使用记事本打开它,并将端口号从8080更改为80:

<Connector port="8080" … />

should be: 应该:

<Connector port="80" … />

Don't forget to restart the server! 不要忘记重启服务器!

Now the link to your application will be: http://localhost/YourWarFileName/ or the computer ip/name instead of localhost. 现在,指向您的应用程序的链接将是: http:// localhost / YourWarFileName /或计算机ip / name而不是localhost。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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