Bakke Medina
Bakke Medina

Reputation: 307

autodeploy web service java with glassfish server 4.1.1?

How can I do to deploy the web service automatically,I have the webService.war file ?I'm working with glassfish 4.1.1 and use a external library postgresql-9.4-1203.jdbc4.jar and I dont know how deploy the .war file thanks.

Upvotes: 1

Views: 474

Answers (2)

Will Hartung
Will Hartung

Reputation: 118714

If you're using the postgres jar file for the JDBC driver and Glassfish's Connection Pool, you will need to restart the server to deploy that file after copying it in to your domain/ext/lib directory.

For the WAR, there is the asadmin command line client, your IDE may have direct support to deploy it from there, you can use the GF administration console, or you can copy the WAR in to the domain/autodeploy directory (assuming you have autodeploy enabled, which is it by default).

There are also HTTP and JMX interfaces, but those are probably not what you're looking for.

Upvotes: 1

Raffaele
Raffaele

Reputation: 51

Not sure what you mean by deploy automatically, however, DeshanR's suggestion is still workable even for 4.1.1. You also have two other options:

You can deploy the war file from the browser by pointing your browser to yourdomain:4848. This will bring you to the glassfish admin console (provided glassfish is up and running and your glassfish is set to use port 4848, which by default it should be). You can then deploy your war file under the applications menu.

If this is a dev environment you can also deploy to your local glassfish from your IDE. This is an example for Eclipse. Connecting your IDE to your local glassfish has the advantage of allowing you to publish changes as you make them.

Upvotes: 1

Related Questions