• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Accessing a secure servlet

 
Ranch Hand
Posts: 303
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Ranch Hand
Posts: 5399
1
Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What do you mean by 'secured' servlet ??
 
Ranch Hand
Posts: 374
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 5399
1
Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic