简体   繁体   中英

How to deploy war file to Glassfish?

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?

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 (ie 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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