Not sure about this – ServletContext has setInitParameter method, but it is only allowed to be set during initialization. Same with Servlet init parameter.They can be modified using the setInitParameter() method.
By the way – on Tomcat 7 I was able to set new context/servlet init parameters in servlet's service() method (which is wrong according to API), but I guess this is Tomcat specific.