File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Sockets and Internet Protocols and the fly likes How to access web site with certificate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "How to access web site with certificate" Watch "How to access web site with certificate" New topic
Author

How to access web site with certificate

Paul Werger
Greenhorn

Joined: Apr 01, 2009
Posts: 7
Greenhorn here:

I need to log into a website with both a user name, password, and a certificate.
I have the username, password, and certificate information (using firebug).
I have the URL syntax to transmit the username and password.
What I can't figure out is which object is best used to transmit the certificate information when I connect to the site.

I appreciate your assistance. Thank you in advance.
ujjwal soni
Ranch Hand

Joined: Mar 28, 2007
Posts: 403
Hi Paul,

Are you comparing the certificate information with the values stored in the database ?


Cheers!!!
Ujjwal B Soni <baroda, gujarat, india> <+919909981973>
"Helping hands are better than praying lips......"
Paul Werger
Greenhorn

Joined: Apr 01, 2009
Posts: 7
Thanks Ujjwal for responding.
I found the certificate information using Firebug.
After some experimentation, it appears that the website doesn't appear to require a specific certificate.
It appears that any machine can use any certificate to log into this site.
The site just needs a certificate.
My certificate is stored in my certificate folder on the IE8 explorer.
Is this what you are asking for?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60046
    
  65

What is the servlet dimension to this question?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Paul Werger
Greenhorn

Joined: Apr 01, 2009
Posts: 7
Hi Bear,

Thanks for your question.

I am using a servlet to connect to the web site through Apache Tomcat.

The intention with the servlet is to screen scrape the table data from the web site into a simple comma separated value (csv) file.

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60046
    
  65

Paul Werger wrote:I am using a servlet to connect to the web site through Apache Tomcat.

How?
Paul Werger
Greenhorn

Joined: Apr 01, 2009
Posts: 7
Bear,

I'm running Tomcat as a server on the computer of the person running this app. (I'm building in Eclipse).

Am I understanding your question?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60046
    
  65

Nope. How are you trying to access an SSL-protected site (I assume that's what you mean by "site with certificate") from your servlet?
Paul Werger
Greenhorn

Joined: Apr 01, 2009
Posts: 7
Hi Bear,

Here is my code:



I can't figure out how to pass the certicate data.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60046
    
  65

There is nothing built into the Servlet Specification for this, so I'm going to move this to a more appropriate forum.
Steve James
Ranch Hand

Joined: Apr 12, 2009
Posts: 44

The servlet technology by design already supports https (SSL). However, the way this works is not through the servlet technology but through the Web Server. The web server controls whether information is done securely (https) versus non-securely (http).



I am just a brick in the wall of Java
Paul Werger
Greenhorn

Joined: Apr 01, 2009
Posts: 7
Thank you for your reply, Steve. Unfortunately, I'm not understanding how I need to program Tomcat to pass on the certificate. If you could give me an example, I would appreciate it.

Steve James
Ranch Hand

Joined: Apr 12, 2009
Posts: 44
I am not paid here to respond to you immediately .

Paul ,

As a developer you would never worry regarding certificates . This is the work done by Admin members.

In order to implement SSL, a web server must have an associated certificate for each external interface (IP address) that accepts secure connections.

These below sites shows what you asked for .

[url]http://www.digicert.com/ssl-certificate-installation-tomcat.htm
[/url]
[url]http://www.geocerts.com/install/tomcat
[/url]
Paul Werger
Greenhorn

Joined: Apr 01, 2009
Posts: 7
OK, so I suppose you have a right to sleep. I took the same option.

Thank you for these links. On early perusal these instructions look to help me. It'll take some study.

I really appreciate this.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to access web site with certificate
 
Similar Threads
Security question
Reading Environment variable and Set it in HttpRequest
This Is How Software Engineering is Done - Paul Wheaton Style
How do I change font color in text area
Sequencing Records