How to Deploy a Java Web Service
By: Emiley J in WebServices Tutorials on 2013-07-10
Having written your web services, the next step is to deploy the web services in a production environment. There are multiple options for deploying a web service. My favourite option is to host it in Tomcat, because thats where I host my other JSPs.
Core Java only
This is the easiest approach that makes it easy to get web services and their clients up and running. The only required software is the JDK, core Java 6 or later. Web services can be deployed easily using the Endpoint, HttpServer, and HttpsServer classes. A tutorial on how to write your first web service with just JDK shows this approach.
Core Java with the current Metro release
This approach takes advantage of Metro features not yet available in the core Java bundle. In general, each Metro release makes it easier to write web services and clients. The current Metro release also indicates where JAX-WS is moving. The Metro release also can be used with core Java 5 if core Java 6 is not an option.
Standalone Tomcat
This approach builds on the familiarity among Java programmers with standalone web containers such as Apache Tomcat, which is the reference implementation. Web services can be deployed using a web container in the same way as are servlets, JSPs, and JSF.
GlassFish
This approach allows deployed web services to interact naturally with other enterprise components such as Java Message Service topics and queues, a JNDI (Java Naming and Directory Interface) provider, a backend database system and the @Entity instances that mediate between an application and the database system, and an EJB (Enterprise Java Bean) container. GlassFish works seamlessly with Metro, including its advanced features, and with popular IDEs (Integrated Development Environment) such as NetBeans and Eclipse.
An appealing feature of JAX-WS is that the API can be separated cleanly from deployment options. Same web service can be deployed in different ways to suit different needs. Core Java alone is good for learning, development, and even lightweight deployment. A standalone web container such as Tomcat provides additional support.A Java application server such as GlassFish promotes easy integration of web services with other enterprise technologies.
Add Comment
This policy contains information about your privacy. By posting, you are declaring that you understand this policy:
- Your name, rating, website address, town, country, state and comment will be publicly displayed if entered.
- Aside from the data entered into these form fields, other stored data about your comment will include:
- Your IP address (not displayed)
- The time/date of your submission (displayed)
- Your email address will not be shared. It is collected for only two reasons:
- Administrative purposes, should a need to contact you arise.
- To inform you of new comments, should you subscribe to receive notifications.
- A cookie may be set on your computer. This is used to remember your inputs. It will expire by itself.
This policy is subject to change at any time and without notice.
These terms and conditions contain rules about posting comments. By submitting a comment, you are declaring that you agree with these rules:
- Although the administrator will attempt to moderate comments, it is impossible for every comment to have been moderated at any given time.
- You acknowledge that all comments express the views and opinions of the original author and not those of the administrator.
- You agree not to post any material which is knowingly false, obscene, hateful, threatening, harassing or invasive of a person's privacy.
- The administrator has the right to edit, move or remove any comment for any reason and without notice.
Failure to comply with these rules may result in being banned from submitting further comments.
These terms and conditions are subject to change at any time and without notice.
- Data Science
- Android
- React Native
- AJAX
- ASP.net
- C
- C++
- C#
- Cocoa
- Cloud Computing
- HTML5
- Java
- Javascript
- JSF
- JSP
- J2ME
- Java Beans
- EJB
- JDBC
- Linux
- Mac OS X
- iPhone
- MySQL
- Office 365
- Perl
- PHP
- Python
- Ruby
- VB.net
- Hibernate
- Struts
- SAP
- Trends
- Tech Reviews
- WebServices
- XML
- Certification
- Interview
categories
Related Tutorials
Content-Security-Policy: object-src, script-src, base-uri and report-uri
Preventing your PDF files to be displayed inside other website IFrames
Prevent other websites from displaying content from your website in an iframe
Returning multiple values from a web service
Java Webservices using Netbeans and Tomcat
How to Deploy a Java Web Service
Java WebService connected to Database
package javax.jws does not exist
Comments