You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Clifton B. Sothoron Jr." <Cl...@LogiXML.com> on 2008/11/24 19:55:00 UTC

User Request Ordering

I have a Tomcat 6.0 Web application with a number of buttons on the
screen. Some of them execute quickly, some more slowly.  However, they
need to execute in order. When a user clicks on a slow button and then
clicks on a fast button Tomcat needs to wait for the results of the slow
button before moving on to the fast executing button. However, this is
not happening. The results of the fast button are disrupting the results
of the slow button.  How do I configure Tomcat to process user requests
in order?

Best,

 

Clifton Sothoron

LogiXML, Development Department
7900 Westpark Drive, Suite T107 |  McLean, VA 22102
(703) 752-9700  Ext. 162 | fax: (703) 773-6903
Clifton.SothoronJr@logixml.com <ma...@logixml.com>  |
http://www.logixml.com <blocked::blocked::http://www.logixml.com/> 

 


RE: User Request Ordering

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Clifton B. Sothoron Jr. [mailto:Clifton.SothoronJr@LogiXML.com]
> Subject: User Request Ordering
>
> How do I configure Tomcat to process user requests in order?

You don't.  Instead, you design your webapp so that it serializes the requests when necessary.  For the coarsest possible lock, synchronize on the session in a filter that runs in front of all of your servlets.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: User Request Ordering

Posted by Ghufran <gh...@vopium.com>.
Hi

 

It is obvious that you must redesign your application.

However you can try this within your current design

Put a flag in the session and that flag should tell what operation has user
performed yet.

 

Ghufran

 

-----Original Message-----
From: Michael Ludwig [mailto:milu71@gmx.de] 
Sent: Tuesday, November 25, 2008 6:24 AM
To: Tomcat Users List
Subject: Re: User Request Ordering

 

Clifton B. Sothoron Jr. schrieb am 24.11.2008 um 13:55:00 (-0500):

> I have a Tomcat 6.0 Web application with a number of buttons on the

> screen. Some of them execute quickly, some more slowly.  However, they

> need to execute in order. When a user clicks on a slow button and then

> clicks on a fast button Tomcat needs to wait for the results of the

> slow button before moving on to the fast executing button.

 

No - Tomcat is patient: the user needs to wait. Don't show him button

two until he's allowed to click it.

 

You coult also use Javascript to disable the button, which, of course,

requires the user not disable Javascript in his browser.

 

> However, this is not happening. The results of the fast button are

> disrupting the results of the slow button.  How do I configure Tomcat

> to process user requests in order?

 

Tomcat is the server, and the server knows everything. So Tomcat can

check whether or not it is legitimate for button X to be clicked on

behalf of user Y. This should be done regardless of whether or not you

move to one of the solutions at the UI level.

 

Michael Ludwig

 

---------------------------------------------------------------------

To start a new topic, e-mail: users@tomcat.apache.org

To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org

For additional commands, e-mail: users-help@tomcat.apache.org

 


Re: User Request Ordering

Posted by Michael Ludwig <mi...@gmx.de>.
Clifton B. Sothoron Jr. schrieb am 24.11.2008 um 13:55:00 (-0500):
> I have a Tomcat 6.0 Web application with a number of buttons on the
> screen. Some of them execute quickly, some more slowly.  However, they
> need to execute in order. When a user clicks on a slow button and then
> clicks on a fast button Tomcat needs to wait for the results of the
> slow button before moving on to the fast executing button.

No - Tomcat is patient: the user needs to wait. Don't show him button
two until he's allowed to click it.

You coult also use Javascript to disable the button, which, of course,
requires the user not disable Javascript in his browser.

> However, this is not happening. The results of the fast button are
> disrupting the results of the slow button.  How do I configure Tomcat
> to process user requests in order?

Tomcat is the server, and the server knows everything. So Tomcat can
check whether or not it is legitimate for button X to be clicked on
behalf of user Y. This should be done regardless of whether or not you
move to one of the solutions at the UI level.

Michael Ludwig

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: User Request Ordering

Posted by André Warnier <aw...@ice-sa.com>.
Clifton B. Sothoron Jr. wrote:
> I have a Tomcat 6.0 Web application with a number of buttons on the
> screen. Some of them execute quickly, some more slowly.  However, they
> need to execute in order. When a user clicks on a slow button and then
> clicks on a fast button Tomcat needs to wait for the results of the slow
> button before moving on to the fast executing button. However, this is
> not happening. The results of the fast button are disrupting the results
> of the slow button.  How do I configure Tomcat to process user requests
> in order?
> 
You can not, and this has nothing to do with Tomcat per se.

I would say that this is a case of a badly-designed user interface.
It should not be possible for the user to click several buttons, if the 
result is so that it might cause trouble in the application. You need to 
control that at the user interface level, which means in the html page 
itself (or applet, if that is what you use).  The inappropriate buttons 
should be disabled (and visibly so for the user), and only enabled when 
it is "legal" for the user to click them, in other words when the 
response from the previous logical action has been received.

At the most, what any HTTP server (Tomcat being one of many) could do, 
is to keep some track of a "user session", that would allow an 
application, at the server side, to notice that some pre-requisite for 
the current request has not been met (like, this other action that 
should have been done before, has not been done yet), and return an 
error to the user.  But that would be quite difficult for the user to 
understand, in addition to loading your application with invalid 
requests.  It would be more logical to prevent this at the source, no ?
(In fact, for security and reliability you need to do both, and not 
absolutely rely on a user-side page that can be manipulated).


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org