This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How can i get session data into business objects.

 
Rakesh Maddala
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I have many number of flows in my web application. All the flows uses one generic method for getting data from the db. In this generic method, i want to check one condition from the session data. How can i do this? If i pass request object from action class till that 'generic method' it becomes too tedious. Do we have any other alternative solution for this problem?

Thanks for your precious time and help.
 
Malatesh Karabisti
Ranch Hand
Posts: 153
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not very clear what you want to achieve, as far as my understanding I can say. Your generic method might be taking the arguments pass the your values as the parameter to the generic method instead passing the big request object. or you can put all the values in ArrayList object and then pass the object.

hope that helps.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13074
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you mean request parameters or session data?

If you need request parameters, use the javax.servlet.ServletRequest.getParameterMap() method to get a Map - avoid passing the request reference around.

Bill


 
Hebert Coelho
Ranch Hand
Posts: 754
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rakesh Maddala wrote:i want to check one condition from the session data
Why don't you just pass this value?

Let's supose that you need to know the userId in the session to create a city:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic