• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlets and SSL

 
Bharatesh H Kakamari
Ranch Hand
Posts: 198
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do I change the code in the Servlets to only accepts https (SSL) connections rather than http connections ?
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • 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
 
Eager Beaver
Ranch Hand
Posts: 187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
HTTP/HTTPS, how are they different. Which to use when.
thanks.
 
Brett Knapik
Ranch Hand
Posts: 255
  • Mark post as helpful
  • send pies
  • 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....
 
Mark Leong
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • 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?
 
Ruslan Ivanov
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what exactly ssl is ? how does one obtain it ?
 
Carl Trusiak
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
  • 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
  • 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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic