purpose of webAppRootKey?

28,872

Solution 1

I had the same question, and found this page and later WebApproot in Spring. It is best explained there in mblinn's answer.

Solution 2

this param is very important, in my tomcat I have two app, in order to achieve localhost/ navigates to app1 and 127.0.0.1/ navigates to app2, FYI both of their context path is / , what I do is I add another Host element to tomcat's server.xml with defaultHost name is 127.0.0.1 and appBase is parent dir of ROOT.war (app2)

hope this is useful

Share:
28,872
Maniganda Prakash
Author by

Maniganda Prakash

Updated on December 24, 2020

Comments

  • Maniganda Prakash
    Maniganda Prakash over 3 years

    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?