开发者

java tomcat6: javax.ws missing

I'm trying to run TinyFbClient (tiny facebook client) and it needs to import javax.ws.rs.core.UriBuilder and javax.ws.rs.cor开发者_StackOverflow中文版e.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!


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜