Results 1 to 11 of 11
  1. #1
    priyanka_t is offline Member
    Join Date
    Dec 2007
    Posts
    9
    Rep Power
    0

    Default session handling

    Hello,
    Plz tell me how to do session handling for evry field in the form...i already did this for the complete frm but its not working for particular fields.plz help

  2. #2
    Abdul Ajis is offline Member
    Join Date
    Dec 2007
    Posts
    12
    Rep Power
    0

    Default

    Can u explain in detail

  3. #3
    priyanka_t is offline Member
    Join Date
    Dec 2007
    Posts
    9
    Rep Power
    0

    Default

    Actually, i have a JSp page,wherein i'm doin session handling.So,i want my page to return to sessionexpired.jsp page after an idletiem for example 1min.
    So, if i click any radiobutton or try enter any field after idle tiem i need to get the mesg as sessionexpired.

  4. #4
    Abdul Ajis is offline Member
    Join Date
    Dec 2007
    Posts
    12
    Rep Power
    0

    Default

    I think , that needs lot of validation . U can do this way , while submitting that from do the validation.

    else{
    Actually session exp is a server level value , u cant take easily that values using java script function means , atleast u have to do a submit to check the expiration
    }

  5. #5
    priyanka_t is offline Member
    Join Date
    Dec 2007
    Posts
    9
    Rep Power
    0

    Default

    can u explain me clearly please....

  6. #6
    Abdul Ajis is offline Member
    Join Date
    Dec 2007
    Posts
    12
    Rep Power
    0

    Default

    U are trying to get session exp using java script means , while clicking radio button and all related to java script things.Session exp is maintained by the server.So i think there is no method available to call server function from the jav a script.So better while submitting the form check that server exp


    1) Search if there is a method to call server functions from the java script
    2) while clicking radio buttion u must have to call a java script function

  7. #7
    priyanka_t is offline Member
    Join Date
    Dec 2007
    Posts
    9
    Rep Power
    0

    Default

    thnx Mr.Abdul

  8. #8
    wsaryada is offline Senior Member
    Join Date
    Jun 2007
    Location
    Bali, Indonesia
    Posts
    757
    Rep Power
    8

    Default

    You can add some attribute to the session object. And then every time you process a user request you need to validate if this session attribute is available on not. If it is not available that redirect it to session expired notification page.

  9. #9
    felixtfelix is offline Member
    Join Date
    Dec 2007
    Location
    Mumbai, India
    Posts
    37
    Rep Power
    0

    Default

    It is better to write one custom tag which we can include in the top of the each and every page.So before evaluating the page it will process the custom tag where we have to check whether the session variable is avialble or not. If not then you can redirect to your sessionexpired.jsp page by something like this
    HttpSession session = this.pageContext().getSession();
    if(session.getAttribute("userSyscode")==null)
    {
    this.pageContext.forward("/jsp/rightsPag.jsp");
    }

  10. #10
    priyanka_t is offline Member
    Join Date
    Dec 2007
    Posts
    9
    Rep Power
    0

    Default

    thnx members, i have fixed the issue...

  11. #11
    mvasanth is offline Member
    Join Date
    Aug 2009
    Location
    Chennai
    Posts
    1
    Rep Power
    0

    Default

    Hi Priyanka, can u please explain me how to fix this issues.

    Thanks in Advance.
    Last edited by mvasanth; 08-11-2009 at 01:12 PM.

Similar Threads

  1. Exception Handling...
    By focus_nitin in forum New To Java
    Replies: 1
    Last Post: 02-16-2008, 03:13 AM
  2. SWT Event Handling
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 12-30-2007, 12:21 PM
  3. Event Handling
    By luisarca in forum Sun Java Wireless Toolkit
    Replies: 5
    Last Post: 05-07-2007, 06:05 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •