Previous Hyperlink problem in JSP


Web tier: servlets, JSP, Web frameworks: Previous Hyperlink problem in JSP

  1. Previous Hyperlink problem in JSP (1 messages)


    I am working in JSP and I am selecting 15 records from the database
    at a time and displaying in the front end in the table.

    I have used Next link which displays next 15 records from the database
    and Previous link to go previous.

    Everything is working fine but the problem is when I click to the previous
    link, the browser says that the page is expired and then the user has to refresh the page to see the previous records.

    In the previous link, I have used the following html tag :

    A href='javascript:history.back();«« Prev

    The above tag works fine in Netscape but gives problem in Internet Explorer.

    Apart from this, I also tried
    A href='<%=request.getHeader("referer")%>'«« Prev
    but its not working as desired.

    Any suggestion or idea will definately help me?



  2. Previous Hyperlink problem in JSP[ Go to top ]

    a better solution to the problem would be to re query into the database and get the required results for a particular page group using some sort of a indexing strategy. This will remove the dependence on your browser behaviour. hope this helps.