Search code examples
javaservletsjava-ee-6

Method setInitParameter servletContext


In "Head First servlet and jsp" there is writtern:

You cannot set application and Servlet init parameters, they are set in the DD

What is the use of this method then? Maybe it's a new feature and the book written in 2004 did not contemplate such a method? Thanks in advance.

Thanks in advance.


Solution

  • In the javadoc, it states @since Servlet 3.0.

    The Servlet 3.0 specification was released much later than 2004.

    You are correct in your assumption.