Suppose we have a page "A" where we can enter any string in text field and on submitting this string has to be saved somewhere to retreive later and this page "A" again pops out to enter any new string.This process continues until we press END button on the page "A" and we can retreive all the string stored earlier and print it as a bill with tabulated index like each string as a seperate index. Eg. 1)abc 2)pqr 3)xyz
I dont want to store these strings in a database and after printing bill this session should be invalidate.
Well, yes.. you can do that.. session.setAttribute("inputItems","value"); and now when it comes to update this values again check if you have the details in the session already, if yes then well use your logic simple would be String concatenation, else adding it some Array or class and saving that in session. and while printing say session.removeAttribute("inputItems"); and you are done.
Universe and Knowledge has no bounderies
Joined: Mar 17, 2008
I understood your point But can you be bit elobrate about the logic portion used.