Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New home for HttpServletRequest injection requirements #608

Open
edburns opened this issue Mar 29, 2024 · 0 comments
Open

New home for HttpServletRequest injection requirements #608

edburns opened this issue Mar 29, 2024 · 0 comments

Comments

@edburns
Copy link

edburns commented Mar 29, 2024

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 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant