jakartaee / servlet

Jakarta Servlet
https://eclipse.org/ee4j/servlet
Other
253 stars 81 forks source link

Why is the description about obtaining jakarta.servlet.forward.mapping missing in Chapter 9.3.1 and 9.4.2? #555

Closed OnlyWick closed 8 months ago

OnlyWick commented 8 months ago

9.3.1. Included Request Parameters

The following request attributes must be set: jakarta.servlet.include.request_uri jakarta.servlet.include.context_path jakarta.servlet.include.servlet_path jakarta.servlet.include.mapping jakarta.servlet.include.path_info jakarta.servlet.include.query_string

These attributes are accessible from the included servlet via the getAttribute method on the request object and their values must be equal to the request URI, context path, servlet path, path info, and query string of the included servlet, respectively. If the request is subsequently included, these attributes are replaced for that include.

I didn't see the mapping in the above description.

The same applies to the following. It is possible to get the mapping through the HttpServletRequest.getHttpServletMapping().

9.4.2. Forwarded Request Parameters The values of these attributes must be equal to the return values of the HttpServletRequest methods getRequestURI , getContextPath, getServletPath, getPathInfo, getQueryString respectively,invoked on the request object passed to the first servlet object in the call chain that received the request from the client.

The result obtained from HttpServletRequest.getHttpServletMapping() in the first servlet that received the request from the client is the same as the result obtained from HttpServletRequest.getAttribute(RequestDispatcher.FORWARD_MAPPING) after multiple forwards.

Did I miss any details?

markt-asf commented 8 months ago

This duplicates #517

OnlyWick commented 8 months ago

@markt-asf Ok. Do I need to submit a PR to remove the redundant keywords that I noticed in the jakartar.servlet-api source code?

markt-asf commented 8 months ago

@markt-asf Ok. Do I need to submit a PR to remove the redundant keywords that I noticed in the jakartar.servlet-api source code?

Ideally, an issue describing the problem and an associated PR to fix it.

OnlyWick commented 8 months ago

@markt-asf OK, I have created new issue.