1 Reply Latest reply on Apr 2, 2002 11:15 AM by Jules Gosnell

    Night of the living dead request parameter

    Mac Rinehart Newbie

      This is the title for my next horror movie. What do you think? ;)

      I'm using JBoss-3.0.0beta2 (slightly out of date build) and jetty for a web server. I'm encountering some strange behaviors with request parameters. I have a debug page attached to all of my JSP pages. This page reports the names and values of all request parameters, and the identities of all session attributes. I have one page that prints a message only if a given request parameter (retryCount) is greater than 0. retryCount is initialized each time the page is visited, and then incremented if there is a request parameter with the given name. The page submits to itself, so each time you reload the page it should increment retryCount by 1. The code for the incrementer is illustrated below:

      &nbsp&nbsp if(request.getParameter("retryCount") != null){
      &nbsp&nbsp&nbsp&nbsp retryCount = Integer.parseInt(request.getParameter("retryCount")) + 1;

      My application goes through a loop of JSP pages, and at the end of the loop it returns to the first page. The last page does not have a retryCount parameter, and returns to the first page. When this return occurs, the retryCount should be restored to 0, and the whole process should start over.

      The problem is that when my cycle of JSP pages returns to the first page, the retryCount is greater than 0 for some reason which I haven't been able to determine. This causes a message "invalid login" to be printed on the screen when no login has been attempted. The really crazy thing is that there's no retryCount parameter in the debug output. Where's this parameter comming from???!!! Is this the result of some page caching mechanism in Jetty? The same issue seems to be fouling up other parts of my application too.