Servlet and application context init parameters are read when the container first loads. They cannot be set during deployment. But this is not the behavior I get when I try to change the init parameters during deployment. I can actually change them and the changes show up when I retreive them from within my servlets.
If you could tell us where the magic setInitParameter is, we might tell you that you are right Are you using some third-party library, or a wrapper around ServletConfig ? This is not supposed to be part of the servlet spec. [ January 31, 2006: Message edited by: Satou kurinosuke ]
there is no magic setInitParameter! Maybe I didn't put my question right. What I mean is that I changed the init parameters in the DD file by hand. And the changes showd up the servlets at deployment time.
Sorry for the misunderstanding. Of course, you can change them by hand, in web.xml, as long as the container has not read it, i.e before deployment.
Joined: Aug 19, 2005
but that's my problem. After the web.xml is loaded by the container, I manually change the init parameter. then I check if the new values can be accessed by my servlet. And they are. This is my problem.