3 Replies Latest reply on Aug 22, 2004 3:24 AM by suo_jian

    accessing secured page

    triathlon98

      I have a servlet which is secured, and a program which needs to access that servlet.

      When the servlet is secured using BASIC authentication, I can easily pass my credentials using the following code

       Authenticator.setDefault( new Authenticator()
       {
       protected PasswordAuthentication getPasswordAuthentication()
       {
       return new PasswordAuthentication( login, pass.toCharArray() );
       }
       } );
      


      However, I changed my servlet to FORM based authentication for a better user experience. Now my automatic authentication no longer works, and the client code gets the login page instead of the actual result.

      Is there a way to send my credentials to the servlet to avoid trying to interpret the login page etc?

      Thanks for the help,
      Joachim