Question

I am learning how to create a Java Web Service JAX-WS. To achieve this I followed this Netbeans 8.0 guide:

In the guide we learn how to create a Web Server, and a Client. Before running the server, I deploy it to NetBeans GlassFish server, and then the client access it. Everything works well locally.

However, now I wish to export the web server into an external file (war, jar, etc) and to run it on a remote machine, so I can then try to access it using my local client.

I have tried using "right-click" on project and searched for export options, but I found none. In the File menu, I am only allowed to export to a ZIP file, which is not what I want because I want to be able to run my code on a remote server that has no NetBeans and no GlassFish installed.

How do I do this?


EDIT

I wish to launch this without maven or any other tools of the kind.

After reading a completely unrelated article from Oracle for Java EE7 I found that i can create wars build building and cleaning the project (following is the version of that article for Java EE6, because I cannot find the one for EE7 :S ):

Having this in mind the challenge is now to launch the generated .war file using java -jar something.jar. For this purpose I am considering using Jetty 8.

Was it helpful?

Solution

You have to deploy your WAR file to the application server/ web container you want it to run your application.

E.g. for Jetty a quick search for "jetty war deploy" should give you links such as:

https://wiki.eclipse.org/Jetty/Howto/Deploy_Web_Applications

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top