views:

1978

answers:

1

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?

+3  A: 

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.

dpb