• 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

doPost getting invoked twice

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
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
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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
reply
    Bookmark Topic Watch Topic
  • New Topic