Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

java tomcat6: javax.ws missing

Tags:

java

tomcat

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!

like image 477
ufk Avatar asked Sep 27 '26 15:09

ufk


1 Answers

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.

like image 156
BalusC Avatar answered Sep 30 '26 04:09

BalusC



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!