Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Creating a JAX-RS Web Service"

Line 1: Line 1:
 
[[Image:ApacheWinkJAXRSLibrary.zip]]  
 
[[Image:ApacheWinkJAXRSLibrary.zip]]  
  
 +
<br>
  
 
+
1. Create a JAX-RS User library from the .jar files in the archive above:[[Image:Snap5.jpg]]  
1. Create a JAX-RS User library from the .jars in the archive above:[[Image:Snap5.jpg]]  
+
  
  
 +
<br>
  
 
2. Create a Dynamic Web Project targeting Tomcat and add the JAX-RS facet:<br> [[Image:Snap1.jpg]]  
 
2. Create a Dynamic Web Project targeting Tomcat and add the JAX-RS facet:<br> [[Image:Snap1.jpg]]  
 +
[[Image:Snap4.jpg]]
 +
<br>
  
 +
<br>
  
 
+
3. Import the src archive into the src folder of the JAXRS project:<br>
3. Import  
+
  
 
<br>  
 
<br>  
  
[[Image:JAXRS.zip]]  
+
[[Image:Src.zip]]  
  
 
[[Image:Snap4.jpg]]  
 
[[Image:Snap4.jpg]]  
  
[[Image:Snap6.jpg]]
+
<br>
  
 
[[Image:Snap7.jpg]]  
 
[[Image:Snap7.jpg]]  

Revision as of 21:19, 29 April 2010

File:ApacheWinkJAXRSLibrary.zip


1. Create a JAX-RS User library from the .jar files in the archive above:Snap5.jpg



2. Create a Dynamic Web Project targeting Tomcat and add the JAX-RS facet:
Snap1.jpg Snap4.jpg


3. Import the src archive into the src folder of the JAXRS project:


File:Src.zip

Snap4.jpg


Snap7.jpg

Define the Initialization parameter name/value as javax.ws.rs.Application/com.test.AddressBookApplication like below.

File:Snap8.jpg

Snap9.jpg

Start the server and add the JAXRS project, enter the following URL in the browser to test the JAX-RS Web Service: http://localhost:8080/JAXRS/jaxrs/addresses

Snap11.jpg

Back to the top