简体   繁体   English

在Tomcat 7.0上运行网站:Windows 2008 R2

[英]Running website on Tomcat 7.0: Windows 2008 R2

My team and I originally had a server running through Eclipse (Java EE), but wanted to switch it to running on the Tomcat 7.0 service found in Windows 2008 R2. 我和我的团队最初有一个通过Eclipse(Java EE)运行的服务器,但希望将其切换为在Windows 2008 R2中的Tomcat 7.0服务上运行。 We are completely clueless on what files to put where in the Tomcat folders found in program files. 我们完全不知道将哪些文件放在程序文件中的Tomcat文件夹中。 The entire server has gone down and we can't go back to the original setup. 整个服务器已关闭,我们无法返回到原始设置。 Any help is appreciated. 任何帮助表示赞赏。 All we're asking is where do we put our JSP/ROOT ect folders in the Tomcat program files. 我们要问的是将JSP / ROOT ect文件夹放在Tomcat程序文件中的什么位置。

Copying JSP files are not good idea rather you can package your jsp file into an archive file called WAR file. 复制JSP文件不是一个好主意,而是可以将jsp文件打包到一个称为WAR文件的存档文件中。 You can export your project from Eclipse IDE as a WAR file. 您可以将项目从Eclipse IDE导出为WAR文件。

After creating the WAR file (.war), you need to find out tomcat installation directory and its called tomcat HOME. 创建WAR文件(.war)后,您需要找到tomcat安装目录及其名为tomcat HOME的目录。 Now you just need to copy the WAR file into the following folder: 现在,您只需要将WAR文件复制到以下文件夹中:

{TOMCAT HOME}/webapps/<project>.war

I'll add to the answer. 我将添加到答案。

If you have folders of running applications from before you can put 'em under 如果您之前有运行应用程序的文件夹,则可以将它们放在

{TOMCAT HOME}/webapps/

war file will un-zip after you start the service. 启动服务后,war文件将解压缩。 once the war is un-zipped, you can delete it, but only after you stop the service for the first time after war deployment. 解除战争压缩后,您可以将其删除,但是只有在战争部署后第一次停止服务后才能删除。

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

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