嗨我试图使用apache 4.0.1使用post方法in this example,但我得到了HttpEntity ClassNotFoundexception
答案 0 :(得分:1)
您不必将httpcore jar包含在您的类路径中。您是通过某个IDE运行jar,webapp还是仅运行应用程序?
修改:根据您的评论。
ClassNotFoundException:org.apache.commons.logging.LogFactory
这是你的罪魁祸首。我假设httpcore使用LogFactory而你没有将它包含在你的类路径中。查找commons-logging.jar并将其包含在类路径中。