Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] remove servlet API from jetty

yea, highly tied is arguable :) 

I built jooby.org on top of Jetty, just want to see if it where possible to remove servlet API from classpath and help users to forget (forever?) Servlet API.

As I said, no big deal :)

On Thu, Dec 11, 2014 at 5:11 PM, Joakim Erdfelt <joakim@xxxxxxxxxxx> wrote:
Meh.

Simply using HttpServletRequest and HttpServletResponse data objects doesn't mean its "highly tied" to the Servlet API.

A raw Jetty Handler has no scope, no ServletContext, no filters, no listeners, no mandated classloader, no annotation scanning, no security, no sessions, no servlet lifecycle, etc ...

Those 2 classes, HttpServletRequest and HttpServletResponse do not make something a servlet.
Everything else on the servlet API is pretty much encapsulated in the WebAppContext -> ServletContextHandler (which you don't have to use)


--
Joakim Erdfelt <joakim@xxxxxxxxxxx>
Expert advice, services and support from from the Jetty & CometD experts

On Thu, Dec 11, 2014 at 12:15 PM, Edgar Espina <espina.edgar@xxxxxxxxx> wrote:
thanks.

today, a jetty handler is highly tied to the Servlet API:

void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response)

not sure what else depends on Servlet API from jetty-server, but I wonder how hard should be to change this to:

void handle(String target, Request baseRequest, Response response)

I'm probably wrong but, isn't baseRequest and request the exactly same instance? and why use HttpServletResponse and not jetty version?

Anyway, isn't a big deal but will be great if the Jetty API can evolve truly independently of Servlet API.


On Thu, Dec 11, 2014 at 3:47 PM, Jesse McConnell <jesse.mcconnell@xxxxxxxxx> wrote:
having said that, the usage of the servlet-api from an implementation
perspective is largely isolated into the jetty-servlet artifact and
you can use the native jetty api's within jetty-server as you wish,
embedded or within the distribution by using the handlers directly or
whatever abstraction suits you.  Just look to the jetty-rewrite module
for inspiration on what can be done before you ever really enter into
the servlet implementation.

cheers,
Jesse
--
jesse mcconnell
jesse.mcconnell@xxxxxxxxx


On Thu, Dec 11, 2014 at 11:15 AM, Joakim Erdfelt <joakim@xxxxxxxxxxx> wrote:
> Not likely to happen for the core server.
>
> However, it has happened in other Client side libraries of Jetty.
> The HTTP Client and WebSocket Client has no requirement on the Servlet API
> anymore.
>
>
> --
> Joakim Erdfelt <joakim@xxxxxxxxxxx>
> webtide.com - intalio.com/jetty
> Expert advice, services and support from from the Jetty & CometD experts
> eclipse.org/jetty - cometd.org
>
> On Thu, Dec 11, 2014 at 9:34 AM, Edgar Espina <espina.edgar@xxxxxxxxx>
> wrote:
>>
>> Hi,
>>
>>   Just wondering how hard it is to remove the Servlet API from "core
>> jetty" and provide a Servlet container as a separated jar/module.
>>
>>  Sometimes I think Servlet API isn't good enough and require a long time
>> to update/upgrade and most of the time I found Jetty API more clean and
>> powerful than Servlet.
>>
>>  Have you ever think on this? is it even possible?
>>
>>  Thanks
>> --
>> edgar
>>
>> _______________________________________________
>> jetty-users mailing list
>> jetty-users@xxxxxxxxxxx
>> To change your delivery options, retrieve your password, or unsubscribe
>> from this list, visit
>> https://dev.eclipse.org/mailman/listinfo/jetty-users
>
>
>
> _______________________________________________
> jetty-users mailing list
> jetty-users@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from
> this list, visit
> https://dev.eclipse.org/mailman/listinfo/jetty-users
_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users



--
edgar

_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users


_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users



--
edgar

Back to the top