Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

session variable

 
Jigar Naik
Ranch Hand
Posts: 762
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi

i want something like following (MVC architecture)

When user login i'm creating DOM instance. When user click on addNode Button
1 NODE get added to my XML document object
<DOC>
<NODE>
...
...
...
...
</NODE>
</DOC>

and than again user clicks on addNode button the another node should be added to my XML Document

after 2nd click
<DOC>
<NODE>
...
...
...
...
</NODE>
<NODE>
...
...
...
...
</NODE
</DOC>

currently when i 2nd time click on addNode button it creates a new XML Document object. and than add 1 NODE to that newly created XML Doc.

i guess this is something related to session... am i right ?

so when the same user is clicking on the addNode button.
it shuld first check if Document is there or not else it should create a new document object and than add a new node to it.

This should be executed once per user session and doc shuld be available to entire application.

how it is possible ?
[ July 15, 2007: Message edited by: Bear Bibeault ]
 
Hanuma Deepak Muvvala
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the addNode logic first getSession by cllaing getSession(false);
I think you will have always session so this will return a session object then call isNew() method on this if it new create the Document else just add node to the document. Hope it may solve........

Regards,
Deepak.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic