Question

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?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top