Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Vanchi Nathan
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Vanchi Nathan
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Vanchi Nathan
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic