• Post Reply Bookmark Topic Watch Topic
  • New Topic

doPost getting invoked twice  RSS feed

 
sushilkumar jamesbond
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have an application inside the ROOT folder in tomcat 3.2.3. Whenever the servlet is getting invoked from a JSP or an html page which is inside a folder.. the doPost is getting invoked twice.
Any help will be greatly appreciated
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is usually caused by an HTML problem.
If you have onSubmit calling a function and this function calls form.submit() it can cause the data to be submitted twice. I believe this may only be a problem in IE
 
sushilkumar jamesbond
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI David,
Thanks for the reply.. but i am not calling any onSubmit. The fn that is being invoked is onKeyPress. How it fns is this fn checks the event of a keypress and when return is pressed.. the form is submitted.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The LiveHttpHeaders plugin for FireFox will let you know right away if there are two requests coming from the client.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What does the web.xml entry for this application look like?
What URL does the form submission use?
Firefox is ideal for debugging all sorts of questions involving HTML and Javascript - love the built in functions and the add-ons are great too.
Bill
[ August 20, 2005: Message edited by: William Brogden ]
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"sushilkumar jamesbond"-
Welcome to the JavaRanch! Please adjust your displayed name to meet the JavaRanch Naming Policy.

We require display names to be two words: your first name, a space, then your last name. Fictitious names are not allowed.

You can change it
here.


Thanks,
Dave
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!