jQuery in Action, 2nd edition
The moose likes JSP and the fly likes JSP database LOADING & Refreshing Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JSP
Reply Bookmark "JSP database LOADING & Refreshing" Watch "JSP database LOADING & Refreshing" New topic
Author

JSP database LOADING & Refreshing

Kaushik Mehta
Greenhorn

Joined: Feb 10, 2003
Posts: 4
I have a JSP page(PurchasesMain.jsp) in a inventory project. It contains details such as docno(autogenerated only 1 for an invoice),recieveddate,invoicedate,invoiceno etc. These will remain the same for a particular bill or product that has been recieved. Now the contents will vary. i.e 10 books , 20 erasers,40 pencils in a invoice. So i am using JSP: include. I have 3 buttons. 1 is addmore another is done. When i click addmore it should keep the docno,recieveddate,etc as the same but the itemdetails will change. At the end when i click the done button, it should store the contents in the database and take me to another page(say Main.jsp). In that i have an option called PurchaseEntries now that should take me to the PurchasesMain.jsp page with the documentno (which is autogenerated) being a new one.This does not happen it shows the same old documentno. someone tell me what to do and what's happening? After storing the contents in the DAtabase iam also setting the contents of the bean(i ve used a bean to store the contents such as docno,invoiceno, invoicedate,recieveddate,etc temporaryly) as NULL.
The DocumentNo(autogenerated) is being kept nowhere please tell me where to keep it.
the entire JSP page is not being refreshed only the new contents that are added are exapaned
[ February 11, 2003: Message edited by: Kaushik Mehta ]
[ February 11, 2003: Message edited by: Kaushik Mehta ]
Debashish Chakrabarty
Ranch Hand

Joined: May 14, 2002
Posts: 224

It is not clear whether u keep the autogenarated docno in session or somewhere else. Also on "Add New" items r you refreshing the whole PurhcaseMain.jsp after each addition?


Debashish
SCJP2, SCWCD 1.4
 
 
subject: JSP database LOADING & Refreshing
 
Threads others viewed
regarding checkbox
connot resolve symbol-variable calculate
Hibernate object mapping... design issue?
Dynamically include and show what's been selected in the last page
regarding html:checkbox
MyEclipse, The Clear Choice