4 Replies Latest reply on Mar 2, 2013 7:53 AM by fakhri.kharrat

    page security on glassfish

      Hi ,
      I'm using Jdev and glassfish as webserver
      I want to make one entry login page for my application deployed on glassfish, I found a solution when the application was deployed on weblogic using ADF Security and authenticated role, but in glassfish ADF Security is not enabled.

      for exp, if i have :


      in the url when i enter :
      http://localhost:8080/MyERP/faces/index.jsf ==> redirect to http://localhost:8080/MyERP/faces/login.jspx
      same thing
      http://localhost:8080/MyERP/faces/app.jsf ==> redirect to http://localhost:8080/MyERP/faces/login.jspx

      because in the login I will determiner the user profile

        • 1. Re: page security on glassfish
          Timo Hahn
          Take a look at this blog https://blogs.oracle.com/emeapartnerweblogic/entry/adf_essentials_security_implementation_for which outlines a glassfish security solution.

          • 2. Re: page security on glassfish
            Thnks Timo
            • 3. Re: page security on glassfish
              the link is very interesting
              when i used weblogic ADF Security :
              in the logout designation link :

              how to logout from application deployed in glassfish ?

              Edited by: fakhri_tn on Feb 12, 2013 4:54 AM
              • 4. Re: page security on glassfish
                because I implemented Glasfish security role mapping on my application, the solution I found to logout my application is to kill the browser process, in that case the user must enter new user login :

                public String browserKill() throws IOException {

                String os = System.getProperty("os.name");

                if (os.contains("Windows")) {

                Runtime.getRuntime().exec("taskkill /F /IM chrome.exe");

                Runtime.getRuntime().exec("taskkill /F /IM iexplore.exe");

                Runtime.getRuntime().exec("taskkill /F /IM firefox.exe");

                Runtime.getRuntime().exec("taskkill /F /IM safari.exe");

                Runtime.getRuntime().exec("taskkill /F /IM opera.exe");

                } else {

                // Assuming a non Windows OS will be some version of Unix, Linux, or Mac

                Runtime.getRuntime().exec("kill `ps -ef | grep -i firefox | grep -v grep | awk '{print $2}'`");

                Runtime.getRuntime().exec("kill `ps -ef | grep -i chrome | grep -v grep | awk '{print $2}'`");

                Runtime.getRuntime().exec("kill `ps -ef | grep -i safari | grep -v grep | awk '{print $2}'`");


                return null;