• 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

Authentication over ssl in jsp

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have tomcat 5.5 and mysql 5 running on my linux box.
Please help me to write authentication code using https protocol.
I am new to J2EE programming.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What kind of authentication are you looking for? Client-to-Server? Server-to-client? Both? HTTPS as used on the web generally authenticates the server to the client, but not the other way around.

Are you maybe asking about basic authentication or form authentication? Both have nothing to do with SSL, though.
 
kaustubh kurambhatti
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I want to provide login page to a web application where in a form i am accepting the username and password. Hence i want to use https protocol in order to provide security to my login page.
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK, so you're talking about form-based authentication. Any decent servlet/JSP tutorial/book covers that. You'll also need to consult the documentation of whichever servlet container you're using on how to enable SSL.

You can use the HttpServletRequest.isSecure method to find out whether a request came through a secure channel, and take appropriate action if it didn't. If you want to require the use of SSL for certain parts of the web app, that can be configured in the web.xml file.
 
reply
    Bookmark Topic Watch Topic
  • New Topic