Loading ...
Sorry, an error occurred while loading the content.

Re: how to kill a session

Expand Messages
  • Bartek
    In JSP you have an interface Session with method close(). Just use it :) ... In javascript you can not do this but you can remove
    Message 1 of 8 , Jan 13, 2007
    • 0 Attachment
      In JSP you have an interface Session with method close(). Just use it :)
      :
      <%
      session.close();
      %>


      In javascript you can not do this but you can remove session cookie.
      Use document.coockie object:

      <script>
      /*set cookie value equals ""*/
      document.coockie="";

      //...

      </script>

      In this method you lost SESSIONID on browser but not no server. So
      server have more and more "zobie session" (like zobie process in UNIX)
      . It's not good :) Sessions are automaticlly kill by server but you
      lost control :)


      //sorry for my terrible language :)
      --- In JavaScript_Official@yahoogroups.com, anji 4u <anji4u_19@...> wrote:
      >
      > hi ,
      >
      > this is anji... i am joined in this gruop..
      >
      > my query is how to kill a session in javascript or jsp.. plz send
      me information..
      >
      > Thanking u
      >
      >
      > ---------------------------------
      > Everyone is raving about the all-new Yahoo! Mail beta.
      >
      > [Non-text portions of this message have been removed]
      >
    • Jonas Raoni
      ... Your question doesn t make sense. If you want to know how to kill a session on XYZ language, ask on the XYZ forum. JavaScript doesn t have a session. If
      Message 2 of 8 , Jan 13, 2007
      • 0 Attachment
        On 1/13/07, anji 4u <anji4u_19@...> wrote:
        > this is anji... i am joined in this gruop..
        >
        > my query is how to kill a session in javascript or jsp.. plz send me information..

        Your question doesn't make sense.

        If you want to know how to kill a session on XYZ language, ask on the XYZ forum.
        JavaScript doesn't have a session.

        If your language has a cookie based session, then you can delete the
        cookie that contains the session id through JavaScript, but you have
        to know the name of the cookie where it's stored.

        --
        Jonas Raoni Soares Silva
        http://www.jsfromhell.com
      • Rob M
        ... From: Emma De Bruin Hi, I m new to this group and frightfully ignorant in Java Script. I do know that I want to do, but am unsure of how to do it, so if
        Message 3 of 8 , Jan 14, 2007
        • 0 Attachment
          ----- Original Message -----
          From: Emma De Bruin

          Hi, I'm new to this group and frightfully ignorant in Java Script. I do
          know that I want to do, but am unsure of how to do it, so if anyone was
          willing to take a JS youngling under their wing I'd be most grateful.
          Anyways my first of many questions is, what exactly is a cron, and do you
          have to link it to a JS or PHP for it to work. I've checked out the cron
          page on my host, and know that you can set it to run at certain times ect.
          but set what to run I am unsure. Please advise!!!

          Emma
          ----------------------------
          Cron or Crontab is a serverside system timer that can execute serverside
          scripts such as PHP, CGI, Bash at predetermined intervals.
          Cron cannot execute Javascript as Javascript is a client side language that
          executes in the browser.
          If you want to know more about CRON then please ask in PHP list group.
          I am happy to answer any JavaScript questions you may have.

          Thanks, Rob M.
        • Jonas Raoni
          ... ^^ ... Cron works like the windows task scheduler , you specify a time interval and it runs the specified command as if it was in the shell. You don t
          Message 4 of 8 , Jan 14, 2007
          • 0 Attachment
            On 1/14/07, Emma De Bruin <e@...> wrote:
            > Hi, I'm new to this group and frightfully ignorant in Java Script. I do
            > know that I want to do, but am unsure of how to do it, so if anyone was
            > willing to take a JS youngling under their wing I'd be most grateful.

            ^^

            > Anyways my first of many questions is, what exactly is a cron, and do you
            > have to link it to a JS or PHP for it to work. I've checked out the cron
            > page on my host, and know that you can set it to run at certain times ect.
            > but set what to run I am unsure. Please advise!!!

            "Cron" works like the "windows task scheduler", you specify a time
            interval and it runs the specified command as if it was in the shell.

            You don't need to use it, unless you have something that should be
            executed periodically, if you have a php script that generates static
            pages, it should be scheduled on the cron for example :)


            --
            Jonas Raoni Soares Silva
            http://www.jsfromhell.com
          • Michael Pakay - www.NJCGL.com League Coo
            A CRON job is similar to the Windows Task Scheduler where you can set a process to run at a designated date and time. The CRON process is set through your
            Message 5 of 8 , Jan 14, 2007
            • 0 Attachment
              A CRON job is similar to the Windows Task Scheduler where you can set a
              process to run at a designated date and time. The CRON process is set
              through your server Control Panel. I use a CRON process daily to remove
              excess records out of my database through a php page. I set the CRON
              process to open a php page at 3:00 AM each morning. Keep in mind a lot
              can go wrong with a cron process. As an example: the path to the file in
              connection with the sever CRON software. Also the server permission to
              the file you want to run. The server permission should be set to 777.
              If you need additional help, let me know. I have been setting up and
              using CRON for several years.
              Michael Pakay

              ***** Example of a my CRON file ******
              #!/usr/local/bin/php
              <?php
              $today = date('Y/m/d', mktime(0, 0, 0, date("m")-3, date("d"),
              date("Y")));
              $link = mysql_connect("localhost","MyUserName","MyPassword");

              mysql_select_db("creation_njcgl");
              $sql = mysql_query("DELETE FROM tblLogFile WHERE ActivityDate <=
              '$today'");
              $sql = mysql_query("DELETE FROM tblLogForm WHERE ActivityDate <=
              '$today'");
              mysql_close();


              print "Process Complete; Purge LogFile/LogForm.";
              ?>


              Emma De Bruin wrote:
              >
              > Hi, I'm new to this group and frightfully ignorant in Java Script. I do
              > know that I want to do, but am unsure of how to do it, so if anyone was
              > willing to take a JS youngling under their wing I'd be most grateful.
              > Anyways my first of many questions is, what exactly is a cron, and do you
              > have to link it to a JS or PHP for it to work. I've checked out the cron
              > page on my host, and know that you can set it to run at certain times ect.
              > but set what to run I am unsure. Please advise!!!
              >
              > Emma
              >
              > [Non-text portions of this message have been removed]
              >
              >
            • Tim Sabin
              Emma, A CRON job is simply a job/program that has been scheduled for certain date(s) and time(s). On UNIX, the environment of a CRON job is very basic; almost
              Message 6 of 8 , Jan 14, 2007
              • 0 Attachment
                Emma,

                A CRON job is simply a job/program that has been scheduled for certain
                date(s) and time(s). On UNIX, the environment of a CRON job is very
                basic; almost everything has to be set up by the programmer. I don't
                know a way to interface JavaScript to CRON; I don't know PHP at all.
                However, in Java there are 2 classes that simulate CRON jobs, with the
                exception that they have full knowledge of everything in the Java
                program: Timer and TimerTask. Timer gets called from your application
                and sets up 1 or more TimerTask objects; TimerTask objects are the
                equivalent of CRON jobs. For more information, see the Javadoc API
                documentation at http://java.sun.com .

                --Tim Sabin


                Emma De Bruin wrote:
                > Hi, I'm new to this group and frightfully ignorant in Java Script. I do
                > know that I want to do, but am unsure of how to do it, so if anyone was
                > willing to take a JS youngling under their wing I'd be most grateful.
                > Anyways my first of many questions is, what exactly is a cron, and do you
                > have to link it to a JS or PHP for it to work. I've checked out the cron
                > page on my host, and know that you can set it to run at certain times ect.
                > but set what to run I am unsure. Please advise!!!
                >
                >
                >
                > Emma
                >
                >
                >
                > [Non-text portions of this message have been removed]
                >
                >
                >
                > Visit http://aiaiai.com for more groups to join
                > Yahoo! Groups Links
                >
                >
                >
                >
                >
                >
              Your message has been successfully submitted and would be delivered to recipients shortly.