-
Dec 28th, 2011, 01:19 AM
#1
How to set setAttributeNamePrefix(Strin) of DefaultSessionAttributeStore dynamically?
Hi,
I want to set prefix of sessionAttribute that is in controller dynamically.
I read JavaDoc of DefaultSessionAttributeStore and found the method public void setAttributeNamePrefix(String attributeNamePrefix).
I know the way to set the prefix statically but I could not find dynamic way.
When I use @SessionAttributes(value = "someAttribute") in controller, the key of the session attribute is the same as the attribute variable name. Sometimes the key could be conflict to other controller's sessionAttribute. So I want to add controller class name or something as the key prefix automatically.
Any advice?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules