You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Steinar Bang <sb...@dod.no> on 2022/08/11 10:27:12 UTC

javax.servlet vs jakarta.servlet: what does PAX Web support

What kind of servlet does pax web white board of karaf 4.4.1 operate
with?  javax.servlet? Or jakarta.servlet?

I'm in the process of moving Jersey from 2.36 to 3.0.6 and jersey have
switched from javax.servlet 3.1.0 to jakarta.servlet 6.0.0.

And this broke in unit tests, because Mockrunner's
MockHttpServletRequest and MockHttpServletResoponse implements
javax.servlet.ServletRequest and javax.servlet.ServletResponse, rather
than jakarta.servlet.ServletRequest and jakarta.servlet.ServletResponse. 

So then I thought "Oooops! What does this mean for the web whiteboard?
What servlet does it expect to have injected?"

Thanks!


- Steinar


Re: javax.servlet vs jakarta.servlet: what does PAX Web support

Posted by Steinar Bang <sb...@dod.no>.
>>>>> On Thu, 11 Aug 2022 12:27:12 +0200, Steinar Bang <sb...@dod.no> said:

> What kind of servlet does pax web white board of karaf 4.4.1 operate
> with?  javax.servlet? Or jakarta.servlet?
[snip!]
> So then I thought "Oooops! What does this mean for the web whiteboard?
> What servlet does it expect to have injected?"

Looks like OSGi 7, at least, operates with javax.servlet
 https://docs.osgi.org/specification/osgi.cmpn/7.0.0/service.http.whiteboard.html

So, what to do, if someone (in this case jersey), have taken the plunge
from javax.servlet 3.1.0 to jakarta.servlet 6.0.0?
 https://en.wikipedia.org/wiki/Jakarta_Servlet

Use dynamic proxies...?