This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Struts and the fly likes ActionContext and Session Objects Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "ActionContext and Session Objects" Watch "ActionContext and Session Objects" New topic
Author

ActionContext and Session Objects

Rishi Kanth
Ranch Hand

Joined: May 23, 2006
Posts: 43
Hi All,

In my application, I obtain the username and password. I then encrypt/encode the values and compare them against the encrypted database values. I am successfully able to retrieve the values from the database and load it into the respective VO objects.

Now, the problem is:

After Login user -> Instance of VO object


As I want to use "user" object in the application, I decrypt the database values, set the VO object with actual values and store them in session.

After Decrypting


When I check the database, after user logs out, the decrypted values(in the VO Objects stored in the session) replace/updates the encrypted value in the database. I am not calling Save() method explicitly anywhere in the program.

Can someone help with the issue.

Thanks,
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Without providing more information it's going to be difficult to help. *Something* is persisting the object. Whatever it is, however, is most likely not Struts.
Rishi Kanth
Ranch Hand

Joined: May 23, 2006
Posts: 43
David Newton wrote:Without providing more information it's going to be difficult to help. *Something* is persisting the object. Whatever it is, however, is most likely not Struts.


Thanks for reply. I have small piece of function which commits the session every time the "results" are displayed in the page. This function has the following statement.

David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Well, obviously the user is part of the ongoing transaction and shouldn't be :)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ActionContext and Session Objects
 
Similar Threads
Problem with the Hibernate Cache (I think)
MultiDimenaional Array sort
Encryption /Decryption
Password Encryption
Store JDBC connection password