This discussion is archived
2 Replies Latest reply: Mar 15, 2011 3:57 AM by 845107 RSS

Java EE 6 Tutorial sample: Form-Based Authentication

umk Newbie
Currently Being Moderated
Hello,

I'm trying to get the form based authentication example from the Java EE 6 Tutorial to work with Internet Explorer 8: http://download.oracle.com/javaee/6/tutorial/doc/bncbx.html#bnccb

This sample application (examples/security/hello1_formauth) works just fine with Chrome, but when I open the URL with IE, I get the usual unsigned SSL certificate warning. I continue but then see a browser popup with the message "Unable to download hello1_formauth/ from localhost". Why is the browser trying to download instead of just render the login page?

Any help appreciated.

Thank you.
  • 1. Re: Java EE 6 Tutorial sample: Form-Based Authentication
    845107 Newbie
    Currently Being Moderated
    I am also facing the same issue........when I use Internet Explorer, a dialog window pops up, saying that file can't be downloaded.

    But same configuration for form based authetication works fine with Firefox browser.

    Thanks,
    Noaman
  • 2. Re: Java EE 6 Tutorial sample: Form-Based Authentication
    845107 Newbie
    Currently Being Moderated
    Got the solution, need to include /faces before the Login and Error page in the <login-config> entry as follows:

    <login-config>
    <auth-method>FORM</auth-method>
    <realm-name>file</realm-name>
    <form-login-config>
    *<form-login-page>/faces/Login.xhtml</form-login-page>*
    *<form-error-page>/faces/Error.xhtml</form-error-page>*
    </form-login-config>
    </login-config>

    This configuration works fine with all the browsers including Internet Explorer.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points