File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes Authentication over ssl in jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Authentication over ssl in jsp" Watch "Authentication over ssl in jsp" New topic
Author

Authentication over ssl in jsp

kaustubh kurambhatti
Greenhorn

Joined: Oct 21, 2009
Posts: 13
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.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41816
    
  62
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.


Ping & DNS - my free Android networking tools app
kaustubh kurambhatti
Greenhorn

Joined: Oct 21, 2009
Posts: 13
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
Marshal

Joined: Mar 22, 2005
Posts: 41816
    
  62
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Authentication over ssl in jsp