I am working on Java web service using TOMCAT server over secured connection(SSL). Client authentication is required to access the webservices. We are handling Client Authentication at Tomcat level. Now if client does not have a valid SSL certificate then he should get a customize error. Now is there any way by which we can send the custom error to client from Tomcat. We dont want an error page, we just want a customize error for client authentication case. Is there any way to achieve this?

有帮助吗?

解决方案

If the SSL connection requires client authentication then the SSL connection will fail if the client certificate is not valid. If there is no SSL connection then there will be no HTTP connection. If there is no HTTP connection there is no HTTP request. If there is no HTTP request then there is no response for you to customize.

In short, the connection fails long before it gets far enough for you to generate a custom error page.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top