tags:

views:

215

answers:

2

Hiya. I'm trying to run TinyFbClient (tiny facebook client) and it needs to import javax.ws.rs.core.UriBuilder and javax.ws.rs.core.MediaType

i don't have javax.ws package.

what jar file am i missing?

programming using netbeans 6.8 on tomcat 6.0.20

thanks!

+1  A: 

You need a concrete JAX-WS implementation. Tomcat isn't, it's just a Servlet API implementation. You'll need another appserver which implements JAX-WS as well (e.g. Glassfish), or to add a concrete JAX-WS implementation to your webapp. Glassfish uses Metro, which is built on top of Sun reference JAX-WS implementation. You can download it separately and use on Tomcat as well. If you Google using keywords "tomcat metro", you'll find several hints at blogs, for example this one.

Update you need javax.ws.rs package, not javax.ws package only ;) So here's a slight modified answer:

You need a concrete JAX-RS implementation. Tomcat isn't, it's just a Servlet API implementation. You'll need another appserver which implements JAX-RS as well (e.g. Glassfish), or to add a concrete JAX-RS implementation to your webapp. Glassfish uses Jersey, which is built on top of Sun reference JAX-RS implementation. You can download it separately and use on Tomcat as well. If you Google using keywords "tomcat jersey", you'll find several hints at blogs, for example this one.

BalusC
i i downloaded jax-rs latest version and added all of it's jars to my project and still package javax.ws.rs.core.* does not exist!
ufk
err.. i tried to upvote you again (i forgot i already did that) and it removed the upvote and i can't add it now, sorry.
ufk
Then either the `jsr311-api-1.x.x.jar` was missing, or you placed it at the wrong place. It needs to be in `/WEB-INF/lib`. **Edit:** as per the upvote problem, I'll edit my question, then you can upvote again.
BalusC
thanks a lot! you've been most helpful!!!!!!!!
ufk
+1  A: 

It seems you need JAX-RS on your classpath. Jersey is the JAX-RS reference imeplementation.

Googling, as advised by BalusC, gives this tutorial, which seems like a good one.

Bozho