aspose file tools*
The moose likes Spring and the fly likes Spring framework Access Session Variables in helper classes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Spring framework Access Session Variables in helper classes" Watch "Spring framework Access Session Variables in helper classes" New topic
Author

Spring framework Access Session Variables in helper classes

Kap Pat
Greenhorn

Joined: Jul 13, 2012
Posts: 1
Following is my code structure

Filter A{


Helper B() // Call to Helper B
int a= HelperA.function();
}
Like these There are multiple helper classes and multiple function calls being made

Helper B{

// Set the attributes in here Value in here
}



HelperA{

function(){

// Using the Session values
}
}
I am not able to relate how to use the sessionattribute notation in this case

Is there a property in Spring framework that will set the session value and can be accessed from any part of the Spring application There are too many function calls and it will be lot of tedious task to change the signature of all the methods
Bill Gorder
Bartender

Joined: Mar 07, 2010
Posts: 1649
    
    7

You lost me? What is it your trying to do? Your sample code is a little bit to abstract I think. I don't understand what this has to do with sessionattribute. Is what you are looking for a session scoped bean that can be autowired in to your Spring services? Take a look here:

http://static.springsource.org/spring/docs/3.1.2.RELEASE/spring-framework-reference/html/beans.html#beans-factory-scopes-session


[How To Ask Questions][Read before you PM me]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Spring framework Access Session Variables in helper classes