Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7710581
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T01:09:41+00:00 2026-06-01T01:09:41+00:00

I would like to grab a pki certificate when a request happens in jersey

  • 0

I would like to grab a pki certificate when a request happens in jersey / spring. I tried doing:

 @GET
 @Path("/testCert")
 @Produces("text/plain")
 public String testCert(@Context HttpServletRequest request)
 {
   X509Certificate[] certs = (X509Certificate[]) request
       .getAttribute("javax.servlet.request.X509Certificate");
   return "Running... \n";
 }

But that didn’t grab my cert out of the browser, and I don’t know what else to try.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T01:09:43+00:00Added an answer on June 1, 2026 at 1:09 am

    The browser won’t send the client certificate unless requested by the server, and you typically need to modify the default server configuration to request a client certificate. For instance, in Tomcat you need to add the attribute clientAuth=true to the Connector element that defines your HTTPS listener. You can also use clientAuth=want* to request a client certificate, but still allow an unauthenticated connection.

    If you have your server set up to request a client certificate and it’s still not being sent, then you might need to set up the browser and/or server to trust the other’s certificate. This is especially relevant if you’re using self-signed certificates — that definitely won’t work without importing the client certificate into the browser trust store.

    The Tomcat SSL How-to is a good starting point for additional information, some of which is not specific to Tomcat; if you’re using a different server you’ll obviously need to hunt down its documentation for configuration options.

    If all else fails, you can pass -Djavax.net.debug=ssl on the command line to get some insight into what’s going on at the SSL layer.

    * Older Tomcat versions used optional to invoke this behavior. Consult the documentation for your specific Tomcat version to determine the correct property.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Would like to get a list of advantages and disadvantages of using Stored Procedures.
I would like to test a string containing a path to a file for
I would like to grab a kanji table on a Wikipedia page and I
So I would like to grab stdout from a subprocess and then write the
I m using codeigniter and would like to grab some user info with ajax.
I have a property in AppDelegate that I would like to grab easily. So
I would like to grab data from a table without using regular expressions. I've
I would like to use c:import or c:url to grab the contents of a
I would like to 1. Grab an object 1 and object 2 from the
I would like to grab an element from a remote HTML page. As I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.