ramdurs kanakangi wrote:

> Hi, I've a simple question.
>
> Since a HttpSession is maintained between a
> client IP & a server IP, how does it work in case
> of the client being behind a firewall/proxy server?
>

Technically, it is not actually based on client IP and server IP.  That would fail
in your proxy case, but also in the case of a multi-user system with independent
client users running their own browsers.

>
> Scenario: lets say we have 2 clients C1 & C2 whose
> requests are routed throught their proxy server P to
> an external webserver W.
>
> In this scenario, does W have just one HttpSession
> with P (for both C1 & C2)?
>
> Or, does W use some other info (like cookies) to
> maintain seperate HttpSessions for C1 & C2?
>

How sessions are maintained is described in the Servlet API Specification,
available at <http://java.sun.com/products/servlet/download.html>.  Basically,
there are two choices:

* Use cookies (which means your proxy case will work
  as long as the proxy faithfully passes on the appropriate
  cookies in each direction)

* Use URL rewriting, which modifies the hyperlinks that
  refer to various pages in the application to include the
  session id.

>
> Thx, Ram.
>

Craig McClanahan

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to