thecodejack
thecodejack

Reputation: 13379

Error Handling in Tomcat Server having a WebService

I have implemented a webservice having client-auth authentication for a tomcat server. Whenever an unauthorised client accesses the server, the tomcat throws SSLHandshakeException to the client. But i want to handle those exceptions as Http error codes or some kind of messages. How can i handle those exceptions? Because my webservice might be accessed by .NET or any other clients.

Upvotes: 0

Views: 183

Answers (1)

Mark Thomas
Mark Thomas

Reputation: 16625

You can't. The SSL handshake occurs before any HTTP requests take place so there is no way to return an HTTP response if the SSL handshake fails.

Upvotes: 2

Related Questions