我看到了这两个OpenId4Java示例:their site和the other one。
你能告诉我除了这个java类做所有的事情之外,我还应该做什么吗?我想我必须在web.xml中设置servlet?
我正在尝试从我的登录按钮的侦听器调用此方法:
authRequest(String userSuppliedString,
HttpServletRequest httpReq, HttpServletResponse httpResp)但是在构造函数中初始化ConsumerManager时,我收到了一个奇怪的错误:
org.apache.jasper.JasperException: javax.servlet.ServletException: java.lang.Exception: java.lang.NoClassDefFoundError: Could not initialize class org.openid4java.discovery.Discovery你知道我错过了什么吗?
提前谢谢。
发布于 2013-04-03 22:28:07
你缺少库openid4java,你可以从他们的网站上下载。
该库还有其他依赖项,这些依赖项包含在您在/lib目录中下载的ZIP文件中(依赖项包括apache-commons、guice等)。
您找到的示例对其他读者是有益的,因为官方的openid4java文档非常不清楚,所以在这里值得一提:http://www.docjar.com/html/api/org/openid4java/samples/consumerservlet/ConsumerServlet.java.html
https://stackoverflow.com/questions/5169840
复制相似问题