This week's giveaway is in the Spring forum.
We're giving away four copies of Learn Spring Security (video course) and have Eugen Paraschiv on-line!
See this thread for details.
Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question about 2.3 Filters and Session Management

 
Paul Frey
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to tie a Session object to a device ID that will be included in GET or POST operation originating from a PDA device. Is it possible to write a filter that wraps the HTTPRequest so that I could control the Session management (ie. create the session object) by using the device ID instead of a cookie or URL rewriting (which will not work with this device)?
The advantage I see to using this method would be that the web application would be insulated from having to behave differently (outside of the filter of course) for different devices.
If you have any feedback, I'd appreciate it. I'd like to get feedback before I venture into too much coding
Thanks.
 
Rob Misek
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Paul,
This is definitely possible I wrote our Session Replication Module for Servlet 2.3 which actually forces the app server to use our session object and you can provide the sessionID (as long as it is unique).
Check out Coherence, the only coherent, clustered, synchronous cache/objectstore. The Servlet 2.3 HTTP-Session Replication module is included in the download. Then if you register and request a development license (free) you will receive the source code outlining how to use Filters to accomplish this.
Later.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic