4 Replies Latest reply: Mar 2, 2013 1:53 AM by fakhri.kharrat RSS

    page security on glassfish

    fakhri.kharrat
      Hi ,
      I'm using Jdev 11.1.2.3 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 :

      login.jspx
      index.jsf
      app.jsf

      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

      Thanks
        • 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.

          Timo
          • 2. Re: page security on glassfish
            fakhri.kharrat
            Thnks Timo
            • 3. Re: page security on glassfish
              fakhri.kharrat
              the link is very interesting
              when i used weblogic ADF Security :
              in the logout designation link :
              /adfAuthentication?logout=true&end_url=/faces/index.jsf

              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
                fakhri.kharrat
                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;

                }


                Fakhri