在 Windows 上部署后,glassfish 在哪里保存您的类/项目?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/5515327/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 16:32:11  来源:igfitidea点击:

Where does glassfish save your class/project after deployment on Windows?

windowsdeploymentnetbeansglassfish-3

提问by neo

I am using Glassfish3.1 on Windows XP. After deploy a web service project using Netbeans, it works fine. But when i go to

我在 Windows XP 上使用 Glassfish3.1。使用 Netbeans 部署 Web 服务项目后,它工作正常。但是当我去

install-path\glassfish-3.1\glassfish\domains\domain1\applications

I don't see my application.

我没有看到我的应用程序。

under install\glassfish-3.1\glassfish\domains\domain1\applications\__internal, there's a folder with the same name as my project. But that folder is empty.

在 下install\glassfish-3.1\glassfish\domains\domain1\applications\__internal,有一个与我的项目同名的文件夹。但是那个文件夹是空的。

But if i deploy a project on linux, i can find my application and classes under applicationfolder.

但是如果我在 linux 上部署一个项目,我可以在application文件夹下找到我的应用程序和类。

So where are they on windows?

那么它们在窗户上的什么地方呢?

回答by Matt Handy

When you use netbeans, the default deployment dir is the build/websubdir of your netbeans project folder. E.g. when your project is called myProject, the deployment dir is myProject/build/web.

使用 netbeans 时,默认部署目录是netbeans 项目文件夹的build/web子目录。例如,当您的项目名为myProject 时,部署目录为myProject/build/web

It's of course a bit irritating since it is usually outside the glassfish install dir. But you can configure your webapp to be based in any dir of your harddrive.

这当然有点刺激,因为它通常在 glassfish 安装目录之外。但是您可以将 webapp 配置为基于硬盘驱动器的任何目录。

In general you can find the location of any of your glassfish webapps in the domain.xmlfile of your domain, e.g. glassfish/domains/domain1/config/domain.xml

通常,您可以在域的domain.xml文件中找到任何 glassfish webapps 的位置,例如glassfish/domains/domain1/config/domain.xml

Each webapp has an <application>element with an attribute location, e.g. for one of my projects:

每个 webapp 都有一个<application>带有属性的元素location,例如对于我的一个项目:

<application context-root="/MyFirstWebService"
     location="file:/C:/.../NetBeansProjects/MyFirstWebService/build/web/" 
     directory-deployed="true" name="MyFirstWebService" object-type="user">

回答by Srihari Konakanchi

you can see path of application where it was deployed through glashfish admin console

您可以通过 glashfish 管理控制台查看应用程序的部署路径

eg.

例如。

http://localhost:4848/

or

或者

http://yourhost_name:4848/

Common Tasks -> Applications -> you_application -> general -> Location:

常见任务 -> 应用程序 -> you_application -> 常规 -> 位置:

回答by ABODE

The location of your deployed project is dependent on the IDE you use. To detect the location. Do the following:

部署项目的位置取决于您使用的 IDE。来检测位置。请执行下列操作:

  1. Launch your Glassfish or Payara server from this location: http://localhost:4848or any other location of your configuration for glassfish or payara server.

  2. Location the sidebar "Common Tasks"

  3. Click on Applications. List of deployed application will drop down

  4. Select you application from the list. Information about your app will display on the right hand side. Check for the Label "Location". e.g : Location:

  1. 从以下位置启动 Glassfish 或 Payara 服务器:http://localhost:4848或 glassfish 或 payara 服务器配置的任何其他位置。

  2. 定位侧边栏“常见任务”

  3. 单击应用程序。已部署应用程序列表将下拉

  4. 从列表中选择您的应用程序。有关您的应用程序的信息将显示在右侧。检查标签“位置”。例如:位置:

file:/C:/Users/Abode/Documents/NetBeansProjects/ImageJavapoint/build/web/

文件:/C:/Users/Abode/Documents/NetBeansProjects/ImageJavapoint/build/web/

Then you will find where your app is being deployed.

然后您将找到您的应用程序的部署位置。

回答by Mike

Try going to install-path\glassfish-3.1\glassfish\domains\domain1\autodeploy

尝试去 install-path\glassfish-3.1\glassfish\domains\domain1\autodeploy