You can migrate web.xml (with something like dom4j ), but I think that is not your point - a context-param makes no sense in an environment without servlets.
I assume that you want to get the value of the init parameter in the class of your web application, which is not a servlet, but, say, a helper class.
You can - your entry point is always a servlet, so get the context-param value there and pass it as a method argument to the method you need.
If this is a configuration that you can allow static , load it only once on the servlet init() .
Bozho source share