• 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

reInstantce

 
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Everyone,My question as following.
In my pargram,I quote one bean by useBean tag in my jsp page,then I put String array into session(named order) which getting from bean,I go into another page and display content of session(order),then I saved session(order) into another session(oldorder)and set isOlder variouble is 1.now I return first page,I want to get value of session(oldorder) and put new value into session(order) but I hope session(order) is empty in this time before I update and put new value.that's all.
I try to reInstance in the condition statment(if) by judging flag (isOlder==1 or isOlder!=1)if isOlder==1 I will use:instanceName=new BeanName();
but the result out of my expectation.session(order) still remains oldvalue and new value.What should I do?
 
Ranch Hand
Posts: 233
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Could you please post the code that does what you describe in words? It will help people understand the problem better.
 
qingwu wang
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm sorry,it looks too wide and I try to change it but I don't know how to resolve.
Thanks all the people attention of my questions,thank you!
the following is the sinppet code.

<hr>


now first I will open NewOrder.jsp and click submit button 'a','b','c' now it forward itself and display 'c'(the last one I have clicked) on the top of NewOrderjsp,then I will click List image and make jump to List.jsp,In the List.jsp,it display all submit value that I have clicked in the NewOrder.jsp and display items own anchor link ,if I click 'void image',this item will be canceled and item will dispear in the display page(List.jsp),now I click savecheck button,then all the items of display page will save into session(orders).because I have clicked 'savecheck image',it is easy that I come in NewOrder.jsp again,then I click submit button 'a' and click 'List image',I go back to Lisp.jsp,by this time,I hope to see 'a',''b','c'items which don't own anchor link but 'a' without being 'savecheck' will display anchor link and can be canceled by clicking 'void image';to OrderBean.java,I saveing value using it so that evaluate to session(orders)variouble.now I can see the result:'a','b','c'is right they lose anchor,then it should display 'a' under them,but it display 'a','b','c','a' which own anchor link,this is to say,when I click 'savecheck' I don't success to enempty session variouble 'orders' or Vector variouble in the OrderBean still keeps older value.it looks like disorder,alas,my english is poor.
[ June 19, 2003: Message edited by: qingwu wang ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic