Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [servlet-dev] New home for HttpServletRequest injection requirements

This seems to imply that this is now a Servlet spec & Servlet TCK concern.
Which it has historically not been.

Eclipse Jetty works with Weld and OpenWebBeans.
The proposed requirements you are putting on the "Servlet Container" are not something Eclipse Jetty does.
Yet Eclipse Jetty works with CDI just fine without them.
Why?  It is because the CDI implementation does this, not the Servlet Container.

These stated requirements seem to be for CDI Implementations.
Also only the CDI TCK has tests to check for these requirements.

- Joakim (has no servlet spec role, just a community member)

On Tue, Mar 19, 2024 at 10:39 AM Arjan Tijms via servlet-dev <servlet-dev@xxxxxxxxxxx> wrote:
Hi,

A Jakarta EE compliant server is required to make HttpServletRequest and a few other types injectable.

There was a requirement for that in the CDI spec, but that will be moved to "somewhere" else. The designated location for it is the specs that own the types, and otherwise it's the platform specification document.

The section in the CDI spec dealing with this now is: 


The specific text for the Servlet types is:

"A servlet container must provide the following built-in beans, all of which have qualifier @Default:

a bean with bean type jakarta.servlet.http.HttpServletRequest, allowing injection of a reference to the HttpServletRequest

a bean with bean type jakarta.servlet.http.HttpSession, allowing injection of a reference to the HttpSession,

a bean with bean type jakarta.servlet.ServletContext, allowing injection of a reference to the ServletContext,

These beans are passivation capable dependencies, as defined in Passivation capable dependencies."


I'd like to propose moving this text to a section in the Servlet specification document, making it clear that it's only required in a Jakarta EE compliant profile (Web and Full), and specifically that Jetty (for example) does not need to do anything here.

Thoughts?

Kind regards,
Arjan Tijms 

_______________________________________________
servlet-dev mailing list
servlet-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/servlet-dev

Back to the top