Eclipse中的Tomcat配置 [英] Tomcat configuration in Eclipse

查看:171
本文介绍了Eclipse中的Tomcat配置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将Eclipse Luna与Tomcat 8结合使用,并对配置文件的不同位置感到困惑。

I'm using Eclipse Luna with Tomcat 8 and am confused by the different locations of config files.

我已经在本地计算机上安装了Tomcat并配置了Tomcat在Eclipse中的操作如下:

I've installed Tomcat on my local machine and configured Tomcat in Eclipse as follows:

因此涉及4个目录


  • a)catalina home :C:\Program Files\AppServers\Tomcat8

  • a) catalina home: C:\Program Files\AppServers\Tomcat8

b)catalina base:C:\Users\xxx\projectname\Tomcat

b) catalina base: C:\Users\xxx\projectname\Tomcat

c)我的Eclipse工作区中的配置路径:
/ servers / Tomcat v8.0 Server at localhost-config

c) the configuration-path within my Eclipse workspace: /Servers/Tomcat v8.0 Server at localhost-config

d)部署路径:wtpwebapps,它是a)的子目录

d) Deploy path: wtpwebapps which is a subdirectory of a)

在a,b,c中,我都有相同的配置文件集(catalina.properties,context.xml,server.xml ...)。这些文件的层次结构是什么,我在哪里为在开发过程中从Eclipse中启动的特定应用程序配置服务器?

Both in a,b,c I have the same set of config-files (catalina.properties, context.xml, server.xml...). What is the hierarchy of these files, where do I configure my server for a specific application that I start from within Eclipse during development?

编辑:与此相关:如果我右键单击服务器选项卡中的服务器,然后选择干净的Tomcat工作目录或只是干净,会发生什么情况?

Related to this: What is happening if I right-click on the server in the servers-tab and choose "clean Tomcat working directory" or simply "clean"?

推荐答案

从Eclipse IDE启动的服务器的配置与 Server期间给出的配置相同位置,具体情况如下:

Your configuration for the server that you start from Eclipse IDE are as you have given during the Server Location settings, in your case:

/ Servers / Tomcat v8.0服务器,位于localhost-config

(这是在Eclipse中配置的,无需手动修改它们。但是,如果要在生产环境中进行相同的设置,可以检查文件。 等

(This is configured in Eclipse, no need to modify them manually. But you can check the files if you want to make the same settings in "production" etc)

详细信息...

关于层次!如您所知,我希望Catalina是tomcat中的引擎,用于实现Servlet / JSP部件。

About the hierarchy! As you already know, I hope, Catalina is the engine in tomcat which implements the Servlet/JSP parts.

C:\Program Files\ \AppServers\Tomcat8 这是您的Tomcat8二进制文件,已在其中安装了tomcat。它可以在没有Eclipse的情况下独立运行,但是取决于配置,您可能看不到与从Eclipse部署的应用程序相同的应用程序。这取决于您在Eclipse中的配置。

C:\Program Files\AppServers\Tomcat8 here is your Tomcat8 binaries, where you have installed tomcat. It can run as stand-alone without Eclipse, but depends on the configuration you might not see the same apps as you deploy from Eclipse. This depends on your configuration in Eclipse.

C:\Users\xxx\projectname\Tomcat 是您在Eclipse中使用的Tomcat自定义文件夹。您已选择将基础项目和Eclipse项目分开。也许您不想触摸Tomcat8安装。这里存在Eclipse能够运行tomcat实例所需的文件。

C:\Users\xxx\projectname\Tomcat is your Tomcat custom folder, where you use in Eclipse. This you have chosen to make base and eclipse project separate. Maybe you dont want to touch the Tomcat8 installation. Here exists the needed files that Eclipse put to be able run a tomcat instance.

并在子文件夹 / Servers / Tomcat v8.0中进行配置路径中位于localhost-config 的服务器。

And with configuration in the subfolder /Servers/Tomcat v8.0 Server at localhost-config in above path.

当Eclipse运行tomcat时,它使用二进制文件(来自 C:\ \程序文件\AppServers\Tomcat8 ),带有用于设置基础的参数(即 C:\Users\xxx\projectname\Tomcat )和用于部署的应用程序文件夹( wtpwebapps )。

When Eclipse run tomcat it uses the binaries (from C:\Program Files\AppServers\Tomcat8) with arguments for setting your base (i.e. C:\Users\xxx\projectname\Tomcat) and with the application folder (wtpwebapps) for deployments.

有关更多信息,请参见 Eclipse Luna-配置Eclipse工作区
,您始终可以检查启动参数以更好地了解所有内容的连接方式,请参见下图:

Read more at Eclipse Luna - Configuration of the Eclipse Workspace And you can always check the startup arguments to understand it better how everything is connected, see image below:

这篇关于Eclipse中的Tomcat配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆