Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Analogue for PHP's $_SESSION - suggestions?

 
John Hutcheson
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm porting a code base from php. PHP which provides global variable to reference $_SESSION functionally not entirely unlike a static reference to the HttpSession of the current request.

I can't help thinking a mapping from the servlet thread to the session populated by a filter. Assuming the thread that runs the filter is the thread the runs the servlet it might work.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rather that trying to map PHP concepts to Java Servlets architecture I think you should back off a kilometer or so and look at the general architecture involved.

You should be very wary of creating ANY static reference related to user state.

Bill
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!