Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes JSP and the fly likes JSP is resubmitted twice on tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "JSP is resubmitted twice on tomcat" Watch "JSP is resubmitted twice on tomcat" New topic
Author

JSP is resubmitted twice on tomcat

Paritosh
Greenhorn

Joined: Dec 03, 2001
Posts: 1
Hello,
I have tried JSP on tomcat.When an html form calls the
JSP via the submit button, the jsp is called twice.
I would like to know if there is some setting involved
with the tomcat.
I would like to get the reply asap.
Paritosh
[This message has been edited by Paritosh (edited December 03, 2001).]
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15952
    
  19

The server has no control over how many times a request is made, so it can't be a Tomcat problem. A lot of people double-click on web pages just like they've been trained to do on desktop apps, and this is more likely your problem.
How is the JSP request being made? A form submit, hyperlink, or something more exotic like JavaScript?


Customer surveys are for companies who didn't pay proper attention to begin with.
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

I think it might be browser specific, but I've had the following code submitting twice:

I'm not recommending you do it this way , just saying there are silly things you can do at the client side to make it all act wierd.
Dave.
Tomas Nilson
Ranch Hand

Joined: Jan 14, 2002
Posts: 33
Hey,
I have had the same problem. Sometimes (say, one out of five) when I submit a form pressing a button (once) it gets executed twice on Tomcat. This works fine though when running on localhost, but not on my ISP.
I really need to solve this... ANY ideas, please??!
/Tom
Originally posted by Tim Holloway:
The server has no control over how many times a request is made, so it can't be a Tomcat problem. A lot of people double-click on web pages just like they've been trained to do on desktop apps, and this is more likely your problem.
How is the JSP request being made? A form submit, hyperlink, or something more exotic like JavaScript?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSP is resubmitted twice on tomcat
 
Similar Threads
Servlet Alias
Converting JSP to XML
RequestProcessor Methods
Getting Prob to deploy new application under tomcat
How to preload a JSP?