如何捕获 LTPA WebSphere 异常
在 WebSphere 7 中使用 LTPA 基本认证时,如果密码不正确,则会抛出异常:
[11/24/10 14:51:44:405 CET] 00000011 exception W com.ibm.ws.wim.adapter.file.was.FileAdapter login
com.ibm.websphere.wim.exception.PasswordCheckFailedException: CWWIM4512E The password match failed.
at com.ibm.ws.wim.adapter.file.was.FileAdapter.login(FileAdapter.java:2009) 在 com.ibm.ws.wim.ProfileManager.loginImpl(ProfileManager.java:3338) 在 com.ibm.ws.wim.ProfileManager.genericProfileManagerMethod(ProfileManager.java:270) 在 com.ibm.ws.wim.ProfileManager.login(ProfileManager.java:374)
这是在我的部署描述符 (web.xml) 中启用的基本身份验证,而不是基于表单。
问题:有没有办法捕获这个异常?这是在请求到达我的 servlet 之前抛出的。
感谢您的阅读。
When using LTPA basic authentication with WebSphere 7 if a password is incorrect an exception is thrown thus:
[11/24/10 14:51:44:405 CET] 00000011 exception W com.ibm.ws.wim.adapter.file.was.FileAdapter login
com.ibm.websphere.wim.exception.PasswordCheckFailedException: CWWIM4512E The password match failed.
at com.ibm.ws.wim.adapter.file.was.FileAdapter.login(FileAdapter.java:2009)
at com.ibm.ws.wim.ProfileManager.loginImpl(ProfileManager.java:3338)
at com.ibm.ws.wim.ProfileManager.genericProfileManagerMethod(ProfileManager.java:270)
at com.ibm.ws.wim.ProfileManager.login(ProfileManager.java:374)
This is with basic authentication enabled in my deployment descriptor (web.xml) not form based.
The question: Is there a way to catch this exception? This is thrown before the request reaches my servlets.
Thanks for reading.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您坚持要捕获这种情况,您应该开发自定义 信任关联拦截器 必须处理基本身份验证,包括错误处理或 自定义 JAAS 登录模块。
If you insisted on catching that situation you should develop either custom Trust Association Interceptor that would have to handle the basic authentication including the error handling or custom JAAS login module.