Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Accessing a secure servlet

 
Barry Brashear
Ranch Hand
Posts: 303
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have written a browser that is attempting to submit a form to a sercured servlet I didn't write. Does anyone know what I need to do to accomplish this?
Thanks!
 
R K Singh
Ranch Hand
Posts: 5388
1
Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you mean by 'secured' servlet ??
 
David Hibbs
Ranch Hand
Posts: 374
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm guessing that since you said you wrote a browser, you're trying to retrieve the response and display it. That would mean that you need the JSSE package. Search the Sun site for JSSE, and you should be able to find what you need.
 
Barry Brashear
Ranch Hand
Posts: 303
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The browser is a "voiced" browser that accessing
company web pages. One of the pages involves submitting a form that is on an https page. I have tried the following :
System.setProperty("java.protocol.handler.pkgs", "com.sun.net.ssl.internal.www.protocol");
Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
When the page is submitted, nothing seems to happen. I was wondering if I need to access the
certificate somehow. Don't really know how to accomplish this.
Thanks.
 
R K Singh
Ranch Hand
Posts: 5388
1
Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Barry Brashear:
One of the pages involves submitting a form that is on an https page.

If you are using https protocol for data transfer then I dont think that you take care of anything as servlet developer. You do a normal programming, its server's job to take care of https protocol.
Please correct me if I am wrong.
 
Dasun Perera
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to understand a bit about SSL v.3 here. As your program is the browser it needs to talk HTTPS which is more or less HTTP over SSL.
JSSE has everything you need to do this. You need to understand the SSL handshake which involes passing certificates.
Play a bit with JSSE and try to gain the concepts into your head.
If you are stuck let me know I have some code which does the same. But I am using Some Baltimore toolkit classes also in this.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!