How to deploy war file to Glassfish?

本秂侑毒 提交于 2020-01-17 05:07:09

问题


I've developed a RESTful web service in netbeans and it made a .war file for me. now i want to deploy it to my host using 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?


回答1:


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

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 (i.e. replacing localhost with your hostname).

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. Remote access to the console is only allowed over https, so these two steps are necessary before you can use it.

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.



来源:https://stackoverflow.com/questions/29197484/how-to-deploy-war-file-to-glassfish

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!