First off I do not run the web servers.  I'm a servlet programmer.  Our network
people told me the following.  On our web servers we do load balancing also via
a local director.  However there is an option to tell the local director to use
the same server once you get a connection.  If you use fail over I'm not sure
how to handle the sessions issue.

Mark Russell
PNC Bank




James Tuan <[EMAIL PROTECTED]> on 06/09/99 07:15:40 AM

Please respond to "A mailing list for discussion about Sun Microsystem's Java
      Servlet API Technology." <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:    (bcc: Mark Russell/TPS/PGH/PNC)
Subject:  Re: cookie with jsdk1.0 ?




Hi Rosdi,

Your right on the money as far as the cookies and the javascript. It is
much easier to do at a browser level in javascript.

The thing I was trying to accomplish is to save multiple values
and retrieve them  from a cookie to be used in the
body of my servlets.

>From the list I should investigate the use of Session Var's. My only
worry with using Sessions is on the production system we use
webserver load balancing software with 4 different web server boxes.
So my concern is that the load balancing software does not redirect
the request to the same server thus the session information is lost.
Then again I could be totally confused about how sessions work.

James Tuan

Rosdi Sedi wrote:
>
> Bruno & James,
>
> I did understand Bruno's problem. I faced the exact same problem quite some
> time ago (imagine writing a servlet for Netscape Enterprise which supports
> (supposedly) only jsdk 1.0!).

>
> What I did (which I think much simpler than what James did, however less
> secure) was having the javascript to check the existence of the cookie.

> the cookie doesn't exist, create one (with appropriate lifespan, say.. 1
> day) then have the javascript to redirect the viewer to 'new visitor page'
> the url will probably looks like this:
> http://the.server/servlet/myServlet?new=1
>
> The servlet can then check the existence of the 'new' parameter. When the
> same viewer visits my site, the javascript will notice that the cookie is
> already there and redirect the viewer to:
> http://the.server/servlet/myServlet?new=0
>
> Oh yes!, of course someone can easily fool my servlet easily by changing the
> 'new' value to 1, which will make him/her a new visitor all the time.
>

___________________________________________________________________________
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

___________________________________________________________________________
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