• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

2 threads generated in MVC model, don't know why?

 
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear all,
I'm in the process in fixing some bugs in my application. I had a strange bug that don't occur in all situations, I traced the bug & I recognized that the problem comes when the same function is called twice. I then traced to this bug & I found that the handler is called twice.
I'm using MVC implementation recommended by IBM.
Also I recognized that it happens mainly in a page, not all the time, the page as a code is very simple, and it submits smoothly in most situation, but I can't figure why it sometimes submits 2 requests, I'm posting the code for submit.
I'm deploying over IBM Websphere App Server 3.5.5
Hope for any guide.
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think you are going to have to expand a bit on your explanation of the problem. Is this a servlet or a JSP? - how does the bug manifest itself? What is this handler you are talking about? Is there a chance that the submit button is just getting clicked twice?
Bill
 
Ashraf Fouad
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thankx, I knew the error, It was because I use <INPUT type="image" ....
and it call Javascript which submits at the end, but the input type image causes the form to be submited immediatly, so 2 threads occur.
thankx
 
Well THAT's new! Comfort me, reliable tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic