This Question is Answered

15 "helpful" answers available (3 pts)
4 Replies Last post: Jul 4, 2008 6:41 AM by varshuj

HTTPForm Submit problem

Jul 4, 2008 12:53 AM

Click to view varshuj's profile Level 2 varshuj 36 posts since
Mar 6, 2008

Hello,

im Using HTTPForm having CommandButton to submit the form.

On action of CommandButton calling HttpRequest Method get and getting TextInputStream by read-open form action URL .

First time getting proper data.

The next time and onwards we submit HTTPForm , Its not getting submitted to the server,It seems to be the Caching issue.or may be some other reason.


Thanks ,

Varsha

Click to view tiju's profile Level 4 tiju 68 posts since
Oct 17, 2007
1. Re: HTTPForm Submit problem Jul 4, 2008 2:06 AM
Hope you are not getting any HttpTooManyConnectionsException which is due to an un-closed stream before submitting again.
Click to view varshuj's profile Level 2 varshuj 36 posts since
Mar 6, 2008
2. Re: HTTPForm Submit problem Jul 4, 2008 2:42 AM
in response to: tiju

Thanks for reply..

we are not getting any HttpTooManyConnectionsException.

We get the same response again – again when we submit the form second
time or 3^rd^ time so on. It means that we are not getting the updated
response from server. Basically

When I press the command button
second time it does not makes any request to server.

If I refresh the page and click on the command
button it works fine for 1^st^ time but from 2^nd^ time and
onward it does not work properly and response is same stale response received
during 1^st^ request


Thanks

varsha

Click to view fukuta's profile Level 6 fukuta 85 posts since
Oct 17, 2007
3. Re: HTTPForm Submit problem Jul 4, 2008 6:09 AM
in response to: varshuj
You can use with-file-caching-style macro to specify the strategy of your http cache.
But, if the url your httpform request to is your own application, you should append some http headers like below to its response not to be cached.

Pragma: no-cache
Cache-Control: no-cache
Expires: Thu, 01 Dec 1994 16:00:00 GMT
Click to view varshuj's profile Level 2 varshuj 36 posts since
Mar 6, 2008
4. Re: HTTPForm Submit problem Jul 4, 2008 6:41 AM
in response to: fukuta

Thanks a lot.......................................:D

This problem was eating my head for past few week and I was totally confused.

Anyway again thankyou for your support.