Ubuntu 12.04中localhost文件夹的位置 [英] Location of localhost folder in Ubuntu 12.04

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

问题描述

我正在使用Tomcat 7.0.29运行Eclipse Juno.我有一些文件被我的webapp保存到了webapp的根目录,我想删除它们.我正在尝试找到localhost文件夹,以便能够执行此操作.我正在阅读的所有内容都告诉我它应该位于/var/www,但是var中没有/www目录.可能在哪里?

I'm running eclipse Juno, with Tomcat 7.0.29. I have some files that are saved to the root of the webapp by my webapp and I want to delete them. I'm trying to find the localhost folder in order to be able to do this. Everything I'm reading tells me it should be at /var/www, however there is not /www directory in var. Where could it be?

推荐答案

由于您使用的是Eclipse IDE,并且您不知道Tomcat安装文件夹在哪里,因此您可以使用IDE通过转到来找到它.Windows/首选项.它将弹出一个首选项"窗口,在左侧树中选择 Server/Runtime Environment 选项,在右侧必须出现 Apache Tomcat v7.x .从列表中选择它,然后选择 Edit ... 选项,它将向您显示tomcat安装目录.我们将此文件夹称为< tomcat>

Since you're using Eclipse IDE and you don't know where your Tomcat installation folder is, you can find it using the IDE by going to Windows/Preferences. It will pop a Preferences window, select the Server/Runtime Environment option in the left tree, in the right side must appear Apache Tomcat v7.x. Select it from the list and select the Edit... option, it will show you the tomcat installation directory. Let's call this folder <tomcat>

现在您知道了文件夹的安装,但是也许Eclipse没有使用它来部署Java Web应用程序.为此,请在Eclipse中转到 Servers 视图(如果在IDE中不可见,请转到 Window/Show view/Servers ),它将向您显示您的tomcat服务器(和其他服务器),双击它.在Tomcat概述窗口中,检查服务器位置面板,展开它,然后检查webapp的部署位置:

Now you know the folder installation, but maybe Eclipse is not using it to deploy the Java Web applications. To make sure of this, in your Eclipse, go to the Servers view (if it's not visible in the IDE, go to Window/Show view/Servers), it will show you your tomcat server (and others), double click on it. In the Tomcat overview window, check the Server locations panel, expand it and check where the webapp is deployed:

  • 如果选择的选项是使用Tomcat安装,则该Web应用程序必须位于 < tomcat> webapps
  • 如果选择的选项是使用工作区元数据,则该Web应用程序必须位于您的工作区中 .metadata/.plugins/org.eclipse.wst.server.core/tmp [number]/wtpwebapps (感谢 Lars Vogel博客文章).这是Eclipse创建的特殊文件夹.
  • If selected option is Use Tomcat installation then the web app must be in <tomcat>webapps
  • If selected option is Use workspace metadata then the web app must be in your workspace inside .metadata/.plugins/org.eclipse.wst.server.core/tmp[number]/wtpwebapps (thanks to Lars Vogel blog post). This is a special folder created by Eclipse.

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

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