Java Servlets – Storing a list of values in web.xml (multiple param-value’s for single param-name)

Servlet spec says that you can have only one value for any context parameter. So, you are left with going with delimited list only.

<context-param>
  <param-name>validHosts</param-name>
  <param-value>example1.com,example2.com,.....</param-value>
</context-param>

Leave a Comment