Meaningless Drivel is fun!*
The moose likes Servlets and the fly likes How to make the subsequent requests to have the parameter values? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "How to make the subsequent requests to have the parameter values?" Watch "How to make the subsequent requests to have the parameter values?" New topic
Author

How to make the subsequent requests to have the parameter values?

Vanchi Nathan
Ranch Hand

Joined: Feb 24, 2004
Posts: 107
Hello,

Here i am trying a example: Core Servlet and JSP, in Page 154, eg: Finding Large Prime Numbers.

My problem is to do refresh for every 5 seconds until all the prime numbers are displayed. For example: if i choose to calculate 10 numbers and each number is of 50 digits in size, then on the first request the parameters are got exactly what i want, but on the second and subsequent requests the paramters are set to the default values: 50 and 120 respectively.

So, my question is how to make the subsequent requests to have the parameter values other than the default values...

thanks


Best regards,<br /> <br />vanchin
Vanchi Nathan
Ranch Hand

Joined: Feb 24, 2004
Posts: 107
Hello, more to add to my question... The book example is using GET method...but, i'm using a POST method on the html form.

regards,
Natarajan Shankar
Ranch Hand

Joined: Jun 10, 2004
Posts: 53
Hi Vanchi,
Your request object will hold all your form values if your using POST method. So the current value you can store in hidden variable and you can get it in destination view.
or
Before refresh you can call a JavaScript and you can submit the form there with the updated value.

Shankar


SCJP/ SCWCD


Best Regards<br />N.Shankar<br />SCJP, SCWCD
Vanchi Nathan
Ranch Hand

Joined: Feb 24, 2004
Posts: 107
Hi Natarajan,

Do you mean that during the auto refresh request the Post data will contain all the hidden elements of the html form without user action event?

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to make the subsequent requests to have the parameter values?