本文介绍了在Windows上部署后,glassfish会将您的课堂/项目保存在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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

我没有看到我的申请。



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



但是如果我在linux上部署项目,我可以在应用程序文件夹。



那么它们在Windows上是什么?

解决方案

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



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



一般来说,您可以在域中找到任何一个glassfish webapps的位置您的域的.xml 文件,例如每个webapp都有一个< application> c $ c>元素具有属性位置,例如对于我的一个项目:

 < application context-root =/ MyFirstWebService
location =file: /C:/.../NetBeansProjects/MyFirstWebService/build/web/
directory-deployment =truename =MyFirstWebServiceobject-type =user>


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

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.

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

So where are they on windows?

解决方案

When you use netbeans, the default deployment dir is the build/web subdir of your netbeans project folder. E.g. when your project is called myProject, the deployment dir is 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.

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

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

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

这篇关于在Windows上部署后,glassfish会将您的课堂/项目保存在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-23 02:33