permaculture playing cards*
The moose likes Servlets and the fly likes 2 threads generated in MVC model, don't know why? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "2 threads generated in MVC model, don Watch "2 threads generated in MVC model, don New topic
Author

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

Ashraf Fouad
Ranch Hand

Joined: Oct 07, 2001
Posts: 80
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.


Ashraf Fouad
SCJP 1.2, SCBCD 5
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12756
    
    5
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

Joined: Oct 07, 2001
Posts: 80
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: 2 threads generated in MVC model, don't know why?
 
Similar Threads
Passing object from Servlet to JSP throws Exception
Changing from GET to POST
jQuery UI Widget issue
S2: Action/DAO mess...
Influence from JavaScript on FacesPortlet-Lifecycle