How to make the page expired when user click back

how to make the page as expired when i click back button on the browser.
i want a better way.
actually i have a timer.when it reaches 00.00 then the expired page will be called automaticlly using location.href="expired.jsp" then if the user clicks back it should not show the previous page.this concept is applied with paging concept
response.setheader is not working ...
i have redirect when click back using
<body onunload>....i call another page here.
but it is not a good way.
so pls help me to solve this problem
using session or another good way

Use this instead.
Frame.setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);

Similar Messages

  • How to make the session expire when the refresh button is clicked

    Hi All,
    I am writing a Struts application where I want the session to expire when the user clicks refresh button or refresh the page by hitting F5, like any Bank sites. Any help will be appreciated.

    The trick isn't invalidating the session. The trick is detecting refresh requests.
    The Synchronizer Token pattern can handle this.
    Struts can do this for you. Check out [this article|http://www.javaworld.com/javaworld/javatips/jw-javatip136.html?page=1]
    Cheers,
    evnafets

  • How to stop the Flex application when user clicks on Cancel button from JS-confirm message?

    Hi All,
    I use the next code when a user clicks on a link:
    private function clickHandler():void
          ExternalInterface.call('confirm', 'Of course you want to go to the Adobe forums!');
          navigateToURL(new URLRequest('http://forums.adobe.com'), '_self');
    This will show up the javascript confimation box. But when the cancel-button is clicked, the user goes straightly to http://forums.adobe.com...
    How to stop Flex performing the next code when a user clicks on the Cancel button?
    Or, how to catch which button is clicked by a user in Flex?
    Thanks!

    I agree with Mr. Hall that using mx.controls.Alert in Flex may be a better route.
    Show the Alert like this:
    // show an alert with a question and yes and no choices
    Alert.show( "Would you like to go to the Adobe Forums?", "Question",
         Alert.YES | Alert.NO, this, closeHandler, null, Alert.YES );
    Then handle the response in the closeHandler() function:
    protected function closeHandler( closeEvent:CloseEvent ):void
    if( event.detail == Alert.YES )
         navigateToURL( new URLRequest('http://forums.adobe.com'), '_self' );
    else if( event.detail == Alert.NO )
         // they chose no
    The following documentation on Alerts may be helpful:
    http://www.flexafterdark.com/docs/ActionScript-Alert
    Let me know if that helps...
    Ben Edwards

  • When the page will be load how to make the page blank in run time

    Dear
    when i will run the page the fields shoud come with blank Field.
    i want to make it in runtime.
    example- i have one page having employees data. but when i will run that page the data will not come only blank fields should come, after thar i will create.

    duplicate how to make the page blank field in runtime

  • How to get the page number when click the(Next page) Icon on Tableview

    Hi all,
           I had implemented a tableview in one of the Views that I had implemented for a BSP application. I am using MVC framework.
    Let us assume when we execute the BSP and a table view got 11 pages.
    How I can keep track of the page number when we click the  (Next page, Previous page, Bottom , Top) Icons on my tableview . Is there any attribute willstore that  corresponding page number of the tableview when we click the corresponding Icon's??
    I had checked both CL_HTMLB_TABLEVIEW and CL_HTMLB_EVENT_TABLEVIEW Classes and i don't find any attribute.
    Any help will be appreciated.
    Thanks in advance.
    Thanks,
    Greetson

    Hi Greetson,
      I was thinking to write a weblog about that.
      But now I would like to have your opinion:
      I coded a generic method in my main controller (but you could also insert it in the application class) that save the firstvisible row in the class  me->firstvisiblerowlist (that is a table)
      DATA: l_firstvisiblerowlist TYPE zmmsp_tableview_1st_visi_row.
      DATA: ff  TYPE ihttpnvp,
            ffs TYPE tihttpnvp.
      me->request->get_form_fields( CHANGING fields = ffs ).
      LOOP AT ffs INTO ff.
        IF ff-name CP 'f*visiblefirstrow'.
          READ TABLE me->firstvisiblerowlist INTO l_firstvisiblerowlist WITH KEY name = ff-name.
          CASE sy-subrc.
            WHEN 0.
              l_firstvisiblerowlist-name  = ff-name.
              l_firstvisiblerowlist-value = ff-value.
              MODIFY me->firstvisiblerowlist FROM l_firstvisiblerowlist INDEX sy-tabix.
            WHEN 4.
              IF sy-tabix = 0.
                l_firstvisiblerowlist-name  = ff-name.
                l_firstvisiblerowlist-value = ff-value.
                APPEND l_firstvisiblerowlist TO me->firstvisiblerowlist.
              ELSE.
                l_firstvisiblerowlist-name  = ff-name.
                l_firstvisiblerowlist-value = ff-value.
                INSERT l_firstvisiblerowlist INTO me->firstvisiblerowlist INDEX sy-tabix.
              ENDIF.
            WHEN 8.
              l_firstvisiblerowlist-name  = ff-name.
              l_firstvisiblerowlist-value = ff-value.
              APPEND l_firstvisiblerowlist TO me->firstvisiblerowlist.
          ENDCASE.
        ENDIF.
      ENDLOOP.
    Than you have to provide a generic method to read the firstvisiblerow for each tableview
    GET_FIRSTVISIBLEROW
    *IM_TABLENAME
    *RE_VALUE
      DATA: l_firstvisiblerow  TYPE zmmsp_tableview_1st_visi_row.
      READ TABLE me->firstvisiblerowlist INTO l_firstvisiblerow WITH KEY name = im_tablename.
      IF sy-subrc = 0.
        re_value =  l_firstvisiblerow-value.
      ELSE.
        re_value =  1.
      ENDIF.
    And in the DO_REQUSET of each controller you could write something like:
    * Paginator
      DATA: l_tab1_visiblefirstrow TYPE sytabix.
      l_tab1_visiblefirstrow = o_bsp_main->get_firstvisiblerow( 'f019id_tab1_visiblefirstrow'    ).
    As usual pass the value to the view via:
      o_page->set_attribute( name = 'tab1visiblefirstrow' value = l_tab1_visiblefirstrow ).
    Did you get it?

  • Could somebody please advice how to stop the pages dropping ,when l go on ebay ,utube etc

    could somebody please advice how to stop the pages dropping ,when l go on ebay ,utube etc

    could somebody please advice how to stop the pages dropping ,when l go on ebay ,utube etc

  • How can we enable tick icon when user click any button

    how can we enable tick icon when user click any button in captivate 6@

    hi first of all thanks for imitate action.
    actually i want to make a menu (TOC) with tick icons, on starting all ticks are disabled but when i click on any button from my menu i want to enable tick for that particular button so that user can know easily the visited button.

  • Invalidate session when user clicks back button

    I want to invalidate the session when user clicks back button, so that user cannot refresh and reload a page.
    Any suggestions will be highly appreciated.
    Message was edited by:
    sam_amc

    * SessionInvalidator.java
    * Created on October 27, 2006, 9:18 AM
    package web;
    import java.io.*;
    import java.net.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    * @author javious
    * @version
    public class SessionInvalidator extends HttpServlet {
        /** Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods.
         * @param request servlet request
         * @param response servlet response
        protected void processRequest(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {
            response.setContentType("text/html;charset=UTF-8");
            PrintWriter out = response.getWriter();
            String reposted = request.getParameter("reposted");
            if("true".equals(reposted))
                HttpSession session = request.getSession(false);
                if(session == null)
                    // This is step 4 and beyond
                    out.println("<html>");
                    out.println("<head>");
                    out.println("<title>Servlet SessionInvalidator</title>");
                    out.println("</head>");
                    out.println("<body>");
                    out.println("<h1>Servlet SessionInvalidator at " + request.getContextPath () + "</h1>");
                    out.println("I said, your session is now invalid! Now where are those Duke Dollars at?");
                    out.println("</body>");
                    out.println("</html>");
                else
                    Integer hitCount = (Integer)session.getAttribute("hitCount");
                    if(hitCount == null)
                        // This is step 2 (the "good" - "stay" page.)
                        out.println("<html>");
                        out.println("<head>");
                        out.println("<title>Servlet SessionInvalidator</title>");
                        out.println("</head>");
                        out.println("<body>");
                        out.println("<h1>Servlet SessionInvalidator at " + request.getContextPath () + "</h1>");
                        out.println("Your session is good.<br>");
                        out.println("If you click the browser's back button, you will invalidate your session.");
                        out.println("</body>");
                        out.println("</html>");
                        hitCount = 1;
                        session.setAttribute("hitCount", hitCount);
                    else
                        //We've used up our good visit
                        session.invalidate();
                        // This is step 3
                        out.println("<html>");
                        out.println("<head>");
                        out.println("<title>Servlet SessionInvalidator</title>");
                        out.println("</head>");
                        out.println("<body>");
                        out.println("<h1>Servlet SessionInvalidator at " + request.getContextPath () + "</h1>");
                        out.println("Your session is now invalid");
                        out.println("</body>");
                        out.println("</html>");
            else
                // because the javascript in the following output will never allow a user
                // to continue clicking back any further than this, we can safely create the session.
                // (or perhaps the session can already be created here and this may not be necessary).
                // A problem lies where if the user chooses to "select" a page back in history they thereby
                // potentially skip back "over" this functionality, thus defeating the purpose of it.
                request.getSession(true);
                // This is step 1 (indirection)
                out.println("<html>");
                out.println("<head>");
                out.println("<title>Servlet SessionInvalidator</title>");
                out.println("</head>");
                out.println("<body onload=\"document.getElementById('invalidatorForm').submit()\">");
                out.println("<h1>Servlet SessionInvalidator at " + request.getContextPath () + "</h1>");
                out.println("<form id=\"invalidatorForm\" action=\"SessionInvalidator\" method=\"POST\">");
                out.println("<input type=\"hidden\" name=\"reposted\" value=\"true\">");
                out.println("</form>");
                out.println("</body>");
                out.println("</html>");
            out.close();
        // <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code.">
        /** Handles the HTTP <code>GET</code> method.
         * @param request servlet request
         * @param response servlet response
        protected void doGet(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {
            processRequest(request, response);
        /** Handles the HTTP <code>POST</code> method.
         * @param request servlet request
         * @param response servlet response
        protected void doPost(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {
            processRequest(request, response);
        /** Returns a short description of the servlet.
        public String getServletInfo() {
            return "Short description";
        // </editor-fold>
    }The problem with even attempting to do this is that with today's browser capabilities, users can optionally choose to jump to a particular page in the browser history and this may not necessarily be the most recent page. In this case, you would also want to invalidate the user's session after already having been there (whatever page that may be). Then you have situations when the user may wish to jump back in history to external pages they were visiting before they reached your own site's pages. Then what happens when they start clicking forward, forward, etc... from there? This is why I prefer writing Swing Clients as alternatives to browser applications. There are soo many possible ways break web applications made for standard web browsers both maliciously and simply by accident or irregular user patterns. Regardless, this servlet would work based on the assumption that all the user(s) would "ever" do aside from moving logically forward is clicking on the browser's "back" button.
    cheers!
    Message was edited by:
    javious

  • How to make the Page UP and down work on a table control screen?

    Dear all,
    Can some one suggest how to make the table control screen work with Page Up and Page down controls.
    when I press on Page down it works for the first time and after that i need to select the table to make it work the second time. it there a way I can make the index on the screen stay on the table control at all times.
    Regard,
    Vj

    Take this code as a referance:
    Sample code for vertical scrolling in PAI processing will look like this:
    MODULE user_command_XXXX INPUT. (XXXX is screen no.)
      CASE ok_code.
        WHEN 'P--'.
          CLEAR ok_code.
          PERFORM paging USING 'P--'.
        WHEN 'P-'.
          CLEAR ok_code.
          PERFORM paging USING 'P-'.
        WHEN 'P+'.
          CLEAR ok_code.
          PERFORM paging USING 'P+'.
        WHEN 'P++'.
          CLEAR ok_code.
          PERFORM paging USING 'P++'.
    *&      Form  PAGING
    *       Form to do scrolling for screen XXXX
    *      -->CODE   OKCODE value (P--, P-, P+, P++ )
    FORM paging USING code.
      DATA: i TYPE i,
            j TYPE i.
      CASE code.
        WHEN 'P--'. <table control name>-top_line = 1.
        WHEN 'P-'.
          <table control name>-top_line =
                  <table control name>-top_line - line_count.
          IF <table control name>-top_line LE 0.
            <table control name>-top_line = 1.
          ENDIF.
        WHEN 'P+'.
          i = <table control name>-top_line + line_count.
          j = <table control name>-lines - line_count + 1.
          IF j LE 0. j = 1. ENDIF.
          IF i LE j.
            <table control name>-top_line = i.
          ELSE.
            <table control name>-top_line = j.
          ENDIF.
        WHEN 'P++'.
          <table control name>-top_line =
                 <table control name>-lines - line_count + 1.
          IF <table control name>-top_line LE 0.
            <table control name>-top_line = 1.
          ENDIF.
      ENDCASE.
    ENDFORM.                               " PAGING
    Regards,
    Ravi

  • ADF-UIX... How to make a page expire

    Dear sirs...
    is it possible to make every page in ADF UIX application expire?
    meaning when i am in page A and go to page B, if i click the browser Back button i would like to get the page expire warning.
    is this possible in JDeveloper 10.1.2.1???
    thanks in advance
    best regards

    Dear sirs...
    is it possible to make every page in ADF UIX application expire?
    meaning when i am in page A and go to page B, if i click the browser Back button i would like to get the page expire warning.
    is this possible in JDeveloper 10.1.2.1???
    thanks in advance
    best regards

  • How to retain the page location when SelectAll or SelectNone are clicked

    Hi,
    I have a fairly large jspx page and to get to the end of the page one needs to scroll down. Towards the end of the page I have a af:table component with “Select All” and “Select None” features. Every time the SelectAll or SelectNone is selected the top part of the page is displayed on the screen and to get back to the table the user has to scroll down again. Is it possible to retain the page location when the SelectAll and SelectNone are clicked.
    Thanks in advance

    Hi,
    actually I don't think that there is a solution to this. It seems that the table is re-painted upon selecting the select all link.
    Frank

  • How to make the page longer

    I'm having an issue fitting everything I need into the space provided by the program. Is there any way to make the page longer in order to fit everything I need into it? Thank you in advance.

    Taffypro wrote:
    What is the best width setting so that my website appears to take up the full screen
    Gary ~ Apple's own design award-winning site at apple.com mostly has a width of *980 pixels*. Apple's developer guidelines for the iPhone/iPod touch say: "Safari on iPhone also sets the viewport width to *980 pixels*, the width of most webpages." And: "...if your webpage is less than *980 pixels* wide causing it to scale too small on iPhone..."

  • Aviod page reload when user hits back button

    Hi
    I got 2 coldfusion pages A and B. When i click a link from
    page A it goes to page B. When i click the back button of the
    browser from page B the page A refreshes and shows. I dont want the
    page A to reload when the user hits the back button of the browser
    (so that all data remains as it was) from page B.
    is there any method to cache the page and show? Or are there
    any other methods? Pls help. I am running this project in Model
    Glue architecture (i dont know whether that makes any difference)

    Normal behaviour is that going back does not cause a page to
    reload. You might be doing something to make that happen. If you
    can figure out what it is, then you can stop doing it.

  • How to show an dropdown menu when user click on one point on lineseries?

    Hi all,
    I am new  in flex development.
    I am showing line series on the chart, I'd like to give some interaction, when user click on the "point" on the line, I'd like to show a dropdown menu, and react to user's choice on the menu item.
    Is it doable? Any sample or reference?
    Thanks in advance.
    /// Jack

    Cool, that definitely moving forward.
    I saw two questions here:
    1. I added mouseOver/mouseOut action to the LineSeries, it then react when I mouse over the line, instead of at the data point.
    2. How do I know the dataPoint's position and locate popmenu in that place? on other words, how do I have dropdown menu. I tried to use "this" as DisplayObjectContainer and send to Menu.createMenu, but seems not working.
    Here is the code pieces I am talking about:
    [Bindable]public var myMenu:Menu;
                // Create and display the Menu control.
                private function createAndShow():void {
                    Menu.
                    myMenu = Menu.createMenu(holder, myMenuData, true);
                    myMenu = Menu.createMenu(null, myMenuData, false);
                    myMenu.labelField="@label";
                    myMenu.show(10, 10);
                private function hideMenu():void {
                    myMenu.hide();
    <mx:series>
                        <mx:LineSeries mouseOver="createAndShow()" mouseOut="hideMenu()" sortOnXField="true"  xField="date1" yField="score1"  displayName="Score1">
    Thanks.

  • How can I make the page scroll when highlighting

    I can only highlight to the bottom of the screen. Then I have to take that and paste it. Then I have to go back and highlight the rest and take it to be pasted.

    hello missdeezy, when i try this the page is scrolling further automatically when i get towards/beyond the bottom of the page with the mouse pointer - alternatively scrolling with the mousewheel, the arrow-key & the page-up/down-key works during text selection.
    in case this doesn't work for you, you may try to launch firefox in safe mode and see if you can replicate this behaviour there? if not, maybe an addon is interfering...
    [[Troubleshoot extensions, themes and hardware acceleration issues to solve common Firefox problems]]

Maybe you are looking for