Hi there Craig,

I've been trying to do a similar kind of thing. Unfortunately the APIs were
deprecated AND DISABLED without warning when they went from Servlet API 2.0
to 2.1. Which is pretty awful for anyone using those API's. Apparently they
were a security risk, but they have legitimate uses as well which the
Servlet API team decided to ignore. :-(

Alternatives are:
- write your own session management,
- observe the way the servlet engine encode sessions and simply copy it
yourself: for JRun, something like <url>?jrunsessionid=<session>

If the powers that be had simply provided a

HttpServletResponse.encodeUrl( String url, boolean force )

method, my (and I suspect your) problems would have been solved... but
despite my repeated requests, they haven't done so yet. :-(

Geoff


-----Original Message-----
From: Craig Berry <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Wednesday, 14 July 1999 6:42
Subject: Getting a session by ID?


>I'm writing an application which involves a rather
>complicated session-management dance.
>Specifically, I need to
>
>* Use JSP to generate an HTML page containing
>  an embedded object pointing to a Flash Generator
>  resource, which will be passed (among other things)
>  the Session ID of the JSP session writing the HTML;
>
>* Use Flash Generator to pull in data from a servlet,
>  passing in the Session ID to get the correct customized
>  data; and
>
>* Inside the servlet, hook up with a bean object existing
>  at session scope associated with the passed-in Session
>  ID, which provides access to the above-mentioned custom
>  data.
>
>I have a prototype going that does all this, but it relies on a
>pair of deprecated functions:
>
>
>ItemSrc.java:47: Note: interface javax.servlet.http.HttpSessionContext has
been
>deprecated.
>      HttpSessionContext context = session.getSessionContext();
>      ^
>ItemSrc.java:47: Note: The method javax.servlet.http.HttpSessionContext
>getSessi
>onContext() in interface javax.servlet.http.HttpSession has been
deprecated.
>      HttpSessionContext context = session.getSessionContext();
>                                                            ^
>ItemSrc.java:48: Note: The method javax.servlet.http.HttpSession
>getSession(java
>.lang.String) in interface javax.servlet.http.HttpSessionContext has been
>deprec
>ated.
>      HttpSession        other   = context.getSession(id);
>                                                     ^
>Note: ItemSrc.java uses a deprecated API.  Please consult the documentation
for
>a better alternative.
>
>
>...which makes me rather nervous, needless to say.  What are my
>non-deprecated alternatives, please?
>
>--
>Craig Berry   ([EMAIL PROTECTED])
>Chief Architect - Product Development
>Intertainer, Inc.
>10950 Washington Blvd., Suite 223
>Culver City, CA 90232
>(310) 895-2081  Fax (310) 202-2929
>------------------------------------------------------------
>To unsubscribe, send email to [EMAIL PROTECTED]
>and include in the body of the message "unsubscribe jrun-development".
>

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to