Let's say I have servlet based web application which uses web.xml
to define context parameters:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" version="3.0"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
<context-param>
<param-name>logging.path</param-name>
<param-value>target/logs</param-value>
</context-param>
</web-app>
Is there any alternative how one can define context params?
The reason I am asking is that you have e.g. @WebFilter
annotation to replace <filter-mapping>
s in web.xml