I am having problem setting up tomcat context variable. I have tried:
in web.xml in root folder(note: it's not the one in conf folder) I tried adding context-param, not work, this did not change anything, the context variable is still null
<context-param> <param-name>testname</param-name> <param-value>testvalue</param-value> </context-param>
using servlet getServletContext.setAttribute("test","ok") to set variable, it does not work either, the variable just stay null all the time.
i have tried to add crossContext=true in server.xml (even though i only have one webapp), it does not work.
so any suggestions?
Thanks