I agree with David, it sounds like it is most like a database issue, however if you 
can't get around the issue, you can always use javascript (with an onclick) to disable 
the button as soon as it is clicked, and then submit the data.  This should fix your 
problem regardless of why the time lag is coming into play

Jose


> -------- Original Message --------
> Subject: RE: [Webware-discuss] crash on double click
> From: "Hancock, David (DHANCOCK)" <[EMAIL PROTECTED]>
> Date: Wed, December 10, 2003 2:43 pm
> To: [EMAIL PROTECTED]
>
> What database are you using? If it's one that supports "auto" columns
> or
> "sequences" (automatically incremented counters, specifically for
> primary
> keys), consider using such a function when you insert.  If your
> database
> doesn't support that, then I'm not sure what you can do.
>
> What I just described is just good database practice.  There's
> probably
> another way to trap the case of submitting the same form twice.
>
> Cheers!
> --
> David Hancock | [EMAIL PROTECTED] | 410-266-4384
>
>
> -----Original Message-----
> From: sandra ruiz [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, December 10, 2003 3:34 PM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: RE: [Webware-discuss] crash on double click
>
>
> this happens with any servlet...
>
> I tried this on my machine and it doesn't really happen. I think this
> is
> because my connection to
> the server is so fast that I dont have enough time to make a double
> click.
> But I've got a  coworker that is doing the tests. He has a slower
> connection
>
> and if he just make more than one click on any button on a form..the
> server
> crash down.
>
> For example: I have a servlet that calls a function that
> inserts(create)
> something in a database.
> When the user makes double click on "Create" instead of just one
> click..the
> server try and try to
> make the insert..and at the end..just gets blank.
>
> other times it shows a database error of "duplicated key". I
> understand
> this is because the server
> try to process the two request..but I need to control this..and only
> permit
> one process.
>
> likewise..we also have a little similar problem with frames..because
> the
> frame called two servlets
> at the same time..and we had to make a delay in one of them with
> javascript
>
>
> Most of my code is just operations to a database..It doesn't do
> anything
> weird..I dont handle
> threads or anything like that.
>
>
> thanks.
>
>
> >From: Geoffrey Talvola <[EMAIL PROTECTED]>
> >To: 'sandra ruiz' <[EMAIL PROTECTED]>,
> >[EMAIL PROTECTED]
> >Subject: RE: [Webware-discuss] crash on double click
> >Date: Wed, 10 Dec 2003 10:15:51 -0500
> >
> >sandra ruiz wrote:
> > > hi, list..i'm not quite sure if this problem its because of
> > > Weware..but when a user makes double click
> > > on a button in a form the server crash down..and returns a blank
> page.
> > >
> > > when i look for in the log of apache I get this error:
> > >
> > > [Fri Oct 24 16:15:31 2003] [error] [client 192.168.25.20]
> (20507)The
> > > timeout specified has expired: ap_content_length_filter:
> > > apr_bucket_read() failed,
> > > referer:..........
> > >
> > > I've looked for this error in Internet..but I've couldn't
> > > find an answer..
> > >
> > > The timeout of my apache is 5 minutes. that's enough for me.
> > > I am using
> > > webware 0.8
> > >
> > > thanks in advance.
> >
> >Need more details.  Does this happen with _any_ servlet, or only with
> one
> >particular servlet?  If with one servlet, then what is that servlet
> doing
> >when you click the button?
> >
> >Double-clicking the button will cause two identical requests to be
> POST'ed
> >at almost the same time.  If your code has thread-safety problems this
> is
> >one way to trigger them... but Webware itself is capable of handling
> this
> >fine.
> >
> >- Geoff
> >
> >
> >-------------------------------------------------------
> >This SF.net email is sponsored by: IBM Linux Tutorials.
> >Become an expert in LINUX or just sharpen your skills.  Sign up for
> IBM's
> >Free Linux Tutorials.  Learn everything from the bash shell to sys
> admin.
> >Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
> >_______________________________________________
> >Webware-discuss mailing list
> >[EMAIL PROTECTED]
> >https://lists.sourceforge.net/lists/listinfo/webware-discuss
>
> _________________________________________________________________
> Consigue aqu� las mejores y mas recientes ofertas de trabajo en Am�rica
>
> Latina y USA: http://latam.msn.com/empleos/
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: IBM Linux Tutorials.
> Become an expert in LINUX or just sharpen your skills.  Sign up for
> IBM's
> Free Linux Tutorials.  Learn everything from the bash shell to sys
> admin.
> Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
> _______________________________________________
> Webware-discuss mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/webware-discuss
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: IBM Linux Tutorials.
> Become an expert in LINUX or just sharpen your skills.  Sign up for
> IBM's
> Free Linux Tutorials.  Learn everything from the bash shell to sys
> admin.
> Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
> _______________________________________________
> Webware-discuss mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/webware-discuss


-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to