Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果我想修改任何 ServletContext 或 ServletConfig 中的初始化参数值。任何人都希望在 servlet 被容器销毁后对其进行更新。有什么出路吗?
您可以在访问时以编程方式设置参数ServletConfig
ServletConfig
config.getServletContext().setInitParameter("foo", "bar")