File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes Multiple times submitting a form leads to errors in submission. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Multiple times submitting a form leads to errors in submission." Watch "Multiple times submitting a form leads to errors in submission." New topic
Author

Multiple times submitting a form leads to errors in submission.

Gayathri Chowduru
Ranch Hand

Joined: Oct 17, 2007
Posts: 42
Hi,
I have a JSP page, which I can give different data and can submit number of times. Here I opened the same JSP page 5 times and gave the same data in first 4 pages and gave the different data in 5th page. When I click Commit(is a button in JSP) on 3rd JSP page, instead of submitting that form's data, it is submitting the 5th JSP form's data. Can anybody please tell me why it is not submitting the each form's data independently? I need the reply to this urgently.
Thanks,
krishnamoorthy kitcha
Ranch Hand

Joined: Feb 04, 2006
Posts: 96
Hi check your jsp coding

where the isthreadsafe option=true or false.
Gayathri Chowduru
Ranch Hand

Joined: Oct 17, 2007
Posts: 42
Hi,
In my JSP code, isThreadSafe is false. So, if I set its value to true, each form's data can be submitted independently??? Please clarify..

Thanks,
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39547
    
  27
In my JSP code, isThreadSafe is false. So, if I set its value to true, each form's data can be submitted independently?


No. By setting it to true you're telling the servlet container that it is thread-safe, because you have programmed it that way. If the code you write is not thread-safe, then the servlet container has no way of making it thread-safe, and you should set that flag to false. But there is no good reason not to make your servlets/JSPs thread-safe.
[ October 22, 2007: Message edited by: Ulf Dittmer ]

Ping & DNS - updated with new look and Ping home screen widget
Gayathri Chowduru
Ranch Hand

Joined: Oct 17, 2007
Posts: 42
Ohhh... Then what is the solution for my issue? Please any one can help me, I need the reply by the end of the day.
Thanks,
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60053
    
  65

Originally posted by Gayathri Chowduru:
I need the reply by the end of the day.

Please read this for reasons that putting such phrases in your posts is less than a good idea.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60053
    
  65

Is your JSP thread-safe? Is the servlet you are submitting the form to thead-safe?
 
wood burning stoves
 
subject: Multiple times submitting a form leads to errors in submission.
 
Similar Threads
Submitting form after n seconds using JavaScript
Problem with textarea
JSF in WSAD 5.1.2
jsp to antoher jsp without submitting it
serlvet exception