> Hi All
>
[quoted text clipped - 16 lines]
>
> Thanks in advance
Not in JSP (or any other web technology).
You can do it in an elegant manner by using the XMLHttpRequest object
in your jsp and send a more frequent but small request that checks for
any update and if it sees one, you can do a refresh or use DOM, but
that does not belong here anymore.
Look for AJAX or ActiveX if you use only IE.
Or you could do a meta based refresh using a hidden IFRAME too
timjowers@gmail.com - 14 Feb 2006 14:21 GMT
Here's another lame way... all four post their updates and are streamed
back responses... but the responses never complete until all four have
posted (think about some static singleton or app context object). The
last bit of the response is some javascript forcing a refresh. Now that
would be hoaky. This html streaming technique was common for task
status a decade ago: stream back the task status as the task is run and
eventually send the </html>.
TimJowers
P.S> A client-server app in HTML? Oh my! Operational systems require
fast response. Web technologies are notoriously slow. Just load up your
system's RAM and try to reload your page. IE becomes slower than
crawling.
>Hi All
>
[quoted text clipped - 16 lines]
>
>Thanks in advance
Before an update you should lock the record and check if it has
changed since you showed it to the user. You can do that via a "last
changed" time-stamp or a field-by-field comparison. If it has changed
you should probably inform the user but you may not need to do so
unless they are changing a column that has already been changed.
> Hi All
>
> One of the specs of the project is that four users insert into the
> database concurrently.
> Once all four have entered their info their pages refresh and display
> the new information.
What you are really talking about here is that there is a four stage
process which mus be completed before any of the clients get the
information updated. This is not concurrency.
> I know it is possible to complete this using a time based method
> e.g requerying & refreshing every 30 secs but
[quoted text clipped - 3 lines]
> e.g. if all four enter their information after 5 secs is there any
> other way of prompting a requery & refresh
There are generally two ways to solve this, 1) the server controls the
information flow or 2) the client controls the information flow. You are
asking about option 1, and that depends on the server type. To be able
to answer you need to provide a bit more information. What is the server
type, a web server, ejb/servlet app server, general app server
framework, what methods are of interrest or of no interrest to solve the
problem, javascript, soap, http etc.
For a webserver you could use perhaps use multipart replies, long
timeouts etc for an app server you could perhaps open up a sidechannel
which the client could listen to for replies etc...
FYI, reading "how to ask questions the smart way" might help you
http://www.catb.org/~esr/faqs/smart-questions.html#id266016
/tom
KieranM - 15 Feb 2006 16:15 GMT
I am using Tomcat 5.0 as my webserver with so far jsp pages but open to
branching into servlets and javascript if possible.