File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Question about 2.3 Filters and Session Management Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Question about 2.3 Filters and Session Management" Watch "Question about 2.3 Filters and Session Management" New topic

Question about 2.3 Filters and Session Management

Paul Frey

Joined: Apr 25, 2002
Posts: 19
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

Paul G. Frey, Jr.
Rob Misek
Ranch Hand

Joined: Sep 24, 2002
Posts: 41
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.

<a href="" target="_blank" rel="nofollow"></a><br /><a href="" target="_blank" rel="nofollow">Coherence:</a> Easily share live data across a cluster!
I agree. Here's the link:
subject: Question about 2.3 Filters and Session Management
It's not a secret anymore!