tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Gilbertson <>
Subject Get "java.lang.ClassCastException" when extracting an X509Certificate from an HTTP request
Date Thu, 16 May 2002 15:30:09 GMT
Following an example from Hall's More Servlets book, I had attempted extracting
a cert from a HTTP request using the following:

X509Certificate cert = 

which generated a difficult to debug class cast exception. The answer 
(thanks to a post from
John Brayton) is of course that you need a cert array instead, eg:

X509Certificate []certAr = (X509Certificate 

I am submitting this as a follow up to Mr. Brayton's post so that others 
can locate the problem


Eric Gilbertson

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message