purpose of webAppRootKey?

Maniganda Prakash picture Maniganda Prakash · Dec 8, 2009 · Viewed 28.2k times · Source

Can somebody explain this entry in web.xml ? When it has to be used and why ?

<context-param>
    <param-name>webAppRootKey</param-name>
    <param-value>webapp.root</param-value>
</context-param>

Is this something related to Spring or general one?

Answer

user159088 picture user159088 · Dec 8, 2009

It is both general and Spring Specific. context-param allows you to specify context parameters (that is general) but what you specify is specific to your application, and your application will look for the parameter and use it.

In this case it is the key of the system property that should specify the root directory of this web app. Applied by WebAppRootListener or Log4jConfigListener.