• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to read https: page

 
Allen Chan
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi when using java.net.URL to read the "https" web page, it returns an URL malform error, what the counter class of URL to use?

thanks,
Allen
 
David Harkness
Ranch Hand
Posts: 1646
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First, you'll need the JSSE (Java Secure Sockets Extension) JAR/library available from Sun. This will allow it to use SSL to process HTTPS requests.

I believe, though I haven't tried it (I worked directly with sockets when writing an HTTPS-capable proxy), that you don't need to do more. However, you may need to register a protocol handler in your code. The library should provide all you need to do to set it up.
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving this to the Sockets and Internet Protocols forum...
 
Hafizur Rahman
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by David Harkness:
I worked directly with sockets when writing an HTTPS-capable proxy


Hello, I m in deadly need your tip to implement HTTPS-capable proxy. Eagerly looking for your help.

Thnx in advance.
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have some code that says it required JSSE in 1.3 but removed it as unnecessary for 1.4. Now I wrote and maintain this code, but have no recollection of commenting JSSE out for 1.4. Does anybody recall a change in 1.4 that might handle HTTPS?
 
Hafizur Rahman
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hmmm.
For proxy to be developed, the interaction is

Browser<->Proxy_to_be_implemented<->Original Server

So the proxy must handle the initial communication with the browser. I cannot get things done using JSSE API. Can anyone put more light on it?

Thanks.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!