简体   繁体   English

如何将战争档案部署到Glassfish?

[英]How to deploy war file to Glassfish?

I've developed a RESTful web service in netbeans and it made a .war file for me. 我在netbeans中开发了一个RESTful Web服务,它为我制作了一个.war文件。 now i want to deploy it to my host using glassfish . 现在,我想使用glassfish将其部署到我的主机上。

there are lots of tutorials on the net about deploying war file to glass fish( for example ) but they all describe how to deploy to local machine(localhost), but as i mentioned i want to deploy to my website host. 网上有很多关于将战争文件部署到玻璃鱼的教程( 例如 ),但是它们都描述了如何部署到本地计算机(本地主机),但是正如我提到的,我想部署到我的网站主机。 how to do that? 怎么做?

You should be able to do that using the admin console. 您应该可以使用管理控制台执行此操作。 This is an old documentation link, but it is still valid: 这是旧的文档链接,但仍然有效:

http://docs.oracle.com/cd/E19798-01/821-1757/ghgjn/index.html http://docs.oracle.com/cd/E19798-01/821-1757/ghgjn/index.html

It tells you to go to http://localhost:4848 but you will obviously need to make sure that you can access the admin console remotely (ie replacing localhost with your hostname). 它告诉您转到http://localhost:4848但是显然您需要确保可以远程访问管理控制台(即用localhost名替换localhost )。

If not, you will need to use the command-line asadmin commands change-admin-password (if the admin password hasn't been set - it defaults to nothing) follwed by enable-secure-admin to allow remote access. 如果没有,您将需要使用enable-secure-admin所允许的命令行asadmin命令change-admin-password (如果尚未设置admin密码-默认为no),以允许远程访问。 Remote access to the console is only allowed over https, so these two steps are necessary before you can use it. 仅允许通过https远程访问控制台,因此在使用它之前,必须执行以下两个步骤。

You will need SSH access to the server you are using to enable that - but if you already have SSH access then you can always use SCP or FTP to transfer your WAR to the server and then follow the steps in the guide you linked to. 您将需要对要使用的服务器进行SSH访问-但是,如果您已经具有SSH访问权限,则可以始终使用SCP或FTP将WAR传输到服务器,然后按照所链接指南中的步骤进行操作。

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

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