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.
我想要一个 servlet 在 ajax 请求上返回 json。为此,我导入了 org.json.jar。但是当我点击 servlet 的 url 时,我得到了类“JSONObject”的 ClassNotFoundException。
我也将 jar 包含在类路径中。
您是否将 jar 文件复制到 servlet 容器的 lib 目录?(喜欢WEB-INF/lib)
WEB-INF/lib