Hi Folks,
The application is a simple JSP/Servlet application.I want to perform a user authentication (using BASIC Authentication) and if the user is authenticated, then I will redirect them to the home screen using SSL (i.e. https). The BASIC Authentication has to be performed on clicking a button. I have added the roles along with their username and password in the tomcat-users.xml, hence no need for Realm as of now.
For achieveing this; initially I configured the BASIC Authentication in my web.xml like this:
The user BASIC Authentcation part of the code works perfectly (the popup dialog appears asking for the username and password and it works fine)
Then I configured SSL by following the following steps:
1) Generated a Keystore using keytool 2) Added the below entry in the server.xml:
3) Added this in web.xml inside the
On running the application, below are the issues I have with it:
1) On clicking the button (for which the BASIC authentication has to be performed), the dialog for authentication did not appeared (which appears for BASIC Authentication asking for username and password)
2) I was redirected to a link with https (yes the https appeared in the url) with GET and the doGet() method of the
servlet gets executed which is incorrect since the submit button form is like this, henc the doPost method should be executed rather than the doGet:
Please let me know where are the issues and how to resolve it to achieve what I am expecting.
Thanks,