Skip to content

New home for HttpServletRequest injection requirements #608

@edburns

Description

@edburns

Tracking issue for https://www.eclipse.org/lists/servlet-dev/msg00638.html.

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: 

https://jakarta.ee/specifications/cdi/4.1/jakarta-cdi-spec-4.1-m1#additional_builtin_beans

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 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions