Difference b/w <context-param> and <init-param>
问题 DD elements <context-param> and <init-param> both can be retrieved by the getInitParameter() method, in the servlet code. Now the question is, how does it differentiate <context-param> and <init-param> ? 回答1: Servlet init parameters are for a single servlet only. Nothing outside that servlet can access that. It is declared inside the <servlet> tag of Deployment Descriptor, on the other hand context init parameter is for the entire web application. Any servlet or JSP in that web application