in reply to CGI for (or against) HttpSession?

Usually, with tomcat, the session data is stored in memory in the JVM, so it could be hard to get at directly from perl :-) Especially since the data (values) in the session can be any java object (not just strings or primitive types).

There are ways of configuring tomcat to store the session data externally, and you might then be able to get at it easier. Look at the tomcat documentation.

If you don't need much information from the session, writing a webservice type interface to a simple java servlet/jsp page might be easier, though.

Replies are listed 'Best First'.
Re^2: CGI for (or against) HttpSession?
by graff (Chancellor) on Mar 30, 2005 at 23:59 UTC
    the session data is stored in memory in the JVM, so it could be hard to get at directly from perl

    Just as I would have guessed. Thanks for confirming that. The notion of saving session data externally (e.g. in a temp file on the server?) seems a bit klunky, but it's worth looking into.

    If you don't need much information from the session, writing a webservice type interface to a simple java servlet/jsp page might be easier, though.

    Forgive me, but I don't know what you're talking about here. It's true that I only need a few short little strings (user-id, organization, permission-level -- less than 48 bytes altogether), and I don't have any trouble with the jsp stuff per se (our java guy provides a jsp template for static page content); so, what would a "webservice type interface to a simple ... jsp page" consist of? Is it some simple, generic thing in java/jsp, or some simple, generic thing in CGI? (Does this become a non-perl question?)