The Scenario here is simple.
1. A form is displayed to the user
2. Upon Submission he is redirected to another jsp page (say interim.jsp)
3. interim.jsp has a form which i want to submit automatically without any user intervention
Now if you mean you do not want to use any client script then I cant think of any way for doing that (if at all its possible).
I'm developing an application that runs on mobile phones.
I have to send some data to the client (on another server) through POST.
So for that reason i asked ... if there's a way out ???
Author and all-around good cowpoke
posted 7 years ago
William's remark got straight to the point: instead of submitting, redirecting and submitting again, why can't the server simply handle everything as the result of the first form submission?
Or maybe I'm not understanding correctly where the two pages are displayed - would they both be displayed on the same device? I'm also unclear what "send some data to the client (on another server)" - a form always submits to a server, not to a client.
Lalit Mehra wrote:Because it is a requirement. Simple.
That doesn't help us one bit. As Ulf, William and myself have pointed out, there are likely alternatives that make more sense. Just saying "it's a requirement" doesn't give us any more information about what all of this is actually trying to accomplish than befire.
Or, to be a little kinder, by people who don't understand the constraints of the architecture, think they understand more than they actually do and follow up with an "All You Have To Do Is..."
HTTP is not a continuous-connection protocol like client/server is. It's a strict request/response protocol where each response corresponds to a request in a strict 1-to-1 ratio.
In order to get an update, therefore, the client must submit a request. I think you understand that, but I wanted to lay out the fundamental strictures formally.
For mobile devices, one of the other alternatives is to submit requests from a J2ME, Android, or even ( ) dot-Net application installed on the phone itself. And guess what lucky person gets to create these apps?
A fundamental problem is that there simply is no universal lowest-common-denominator undercover automated submit framework for mobile devices. Some phones are, bluntly, too stupid to support anything at all. Although that particular segment is probably nearly extinct by now.
A more realistic goal is to define your audience, find out what options you can choose for that particular audience, and develop for those options. Don't expect to be all things to all people. You'll either have to simply not support the fringe cases or provide an alternative such as a manual submit button.
"privilege" comes from the Latin words for "private" and "law" (legal) and dates to feudal times. To "claim privilege" meant that you were above the laws that applied to the common people.