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.
如何在 zk 框架中获取 servletconfig 对象?
因为我们可以使用 nativerequest 和 response 来获取 httpservletRequest 和 httpservletresponse,但是 servletconfig 呢?
您正在寻找WebApp实例,您可以通过调用Desktop.getWebApp()来获取它。WebApp 是一个包装器,它包装了 ServletContext 和 ServletConfig,并具有与两者相似的 API。