开发者

OpenId4Java - firing the servlet?

I see these two OpenId4Java examples: their site and the other one.

Can you tell me please what I should do apart of having this java class which is doing all the stuff? I suppose I have to set up the servlet in web.xml?

I'm trying to call this method from my Listener of the login button:

authRequest(String userSuppliedString,
        HttpServletRequest httpReq, HttpServletResponse httpResp)

but I receive a strang开发者_C百科e error when initializing the ConsumerManager in constructor:

org.apache.jasper.JasperException: javax.servlet.ServletException: java.lang.Exception: java.lang.NoClassDefFoundError: Could not initialize class org.openid4java.discovery.Discovery

Do you know what I am missing?

Thanks in advance.


You are missing library openid4java, which you can download from their website.

That library has other dependencies which is included in the ZIP file you download in the /lib directory (dependencies being apache-commons, guice, etc.).

The example you found is beneficial to other readers since official openid4java documentation is pretty unclear, so it is worth mentioning here: http://www.docjar.com/html/api/org/openid4java/samples/consumerservlet/ConsumerServlet.java.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜