In Section 8.1.1 of Servlet 3.0, we have the following:
If the same servlet class is declared in the deployment descriptor under
a different name, a new instance of the servlet MUST be instantiated. If
the same servlet class is added to the ServletContext via the
programmatic API defined in Section 4.4.1, "Programmatically adding and
configuring Servlets" on page 4-31 the values declared via the
@WebServlet annotation MUST be ignored and a new instance of the servlet
with the name specified MUST be created.
Both sentence should referred to adding the same servlet class with the
"different name".
So, the second sentence should be modified as follows:
If the same servlet class is added with the different name to the
ServletContext via the programmatic API defined in Section 4.4.1,
"Programmatically adding and configuring Servlets" on page 4-31, the
attribute values declared via the @WebServlet annotation MUST be ignored
and a new instance of the servlet with the name specified MUST be created.
I plan to fix this by Thur COB PST if there is no other opinion.
Shing Wai Chan