1 Reply Latest reply on Sep 3, 2003 4:46 AM by Peter Doornbosch

    Separate login to a web page and from an Applet

    AJ Aw Newbie

      Hi,
      I have secured a web resource
      http://localhost:8080/myproject/WorkApplet.html

      I use BASIC auth-method for it. Now through the applet on this page, I call a secure EJB, which is secured using the same security-domain. But when I do this I get SecurityException. I configured a LoginContext inside the applet. So when I login the second time thru the Applet (with the same username/password) then I can access the EJB. Why do I have to authenticate separately for the Applet? Is there a better way of doing this and logging in only once?

      Thanks,
      -AJ

        • 1. Re: Separate login to a web page and from an Applet
          Peter Doornbosch Apprentice

          > Why
          > do I have to authenticate separately for the Applet?

          short answer: Because it uses a separate connection.
          long answer: What did you expect? You secure the html file by basic authentication, that is: http-based security. You access an EJB over RMI.... and then.... you expect the bean to figure out the call is started from an applet that is downloaded from a secured page???