Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / October 2006

Tip: Looking for answers? Try searching our database.

Need help in my code

Thread view: 
mory2311 - 30 Oct 2006 19:01 GMT
Hi all ,

This is my first project I work in , and I need help to solve a problem
..

I have a method to insert data from JSP page ' form1'  into database
then return a number ' X ' from database to another JSP page ' form2 '
.

the problem is : each time I refresh ' form2 '  the number ' X '
increase coz the servlet code excuted and invoke the methode to insert
the same data into DB then return the new value of  ' X ' although some
of entered data are defined as primary key or unique fields and should
not be entered twice .

what should I do ??
Pawel Szulc - 30 Oct 2006 19:07 GMT
> what should I do ??

read a book?
Wesley Hall - 30 Oct 2006 19:36 GMT
> what should I do ??

You have a common problem, the refresh button on the browser is
resubmitting the POST request.

Read this for a description of the problem and a solution:

http://www.theserverside.com/tt/articles/article.tss?l=RedirectAfterPost
polilop - 30 Oct 2006 21:27 GMT
try using http://struts.apache.org/

> Hi all ,
>
[quoted text clipped - 12 lines]
>
> what should I do ??


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.