• 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
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Servlets and SSL

 
Ranch Hand
Posts: 198
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How do I change the code in the Servlets to only accepts https (SSL) connections rather than http connections ?
 
author
Posts: 3252
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Bharatesh H Kakamari:
How do I change the code in the Servlets to only accepts https (SSL) connections rather than http connections ?


This is more an application server set-up or request filtering issue. Arguably, the servlets themselves should be agnostic. Having said that, look into HttpServletRequest.getAuthType().
- Peter
 
Ranch Hand
Posts: 187
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
HTTP/HTTPS, how are they different. Which to use when.
thanks.
 
Ranch Hand
Posts: 255
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HTTP: standard used when browsing the web.
HTTPS: Secure version of HTTP. This is what makes it safe to transfer CC numbers online and other personal information private
------------------
In Gates we trust. Yeah right....
 
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can I just move the servlets (without changes) to a web server with SSL support and expect them to work?
 
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
what exactly ssl is ? how does one obtain it ?
 
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Mark Leong:
Can I just move the servlets (without changes) to a web server with SSL support and expect them to work?


Maybe, you'll have to evaluate the servlet code and the new webserver.
1) Does the webserver implement the same version (or higher) of the servlet API that your existing server does?
2) Did your servlet code use any propietary packages or code from your origninal server that isn't included or supported on the new one?
3) Does the new server have a documented bug that will prevent your code from executing properly?
If this evalutes positively then the only thing you can do is test it. Chances are there will be some tweeking to be done to either your servlet code or to the configuration of the new server.
------------------
Hope This Helps:)
Carl Trusiak
 
Mark Leong
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you for reply.
Assuming that the answers to the questions are positive, what type of tweakings do I need to do, for example?
 
reply
    Bookmark Topic Watch Topic
  • New Topic