Re: Cookies, sessions and proxy servers

2002-04-26 Thread Adrian Janssen

hey Gary,

Are you sure it is the proxy? I have encountered the exact same problem but
the cause was IE6 automatically disabling cokies becuase the web sitye did
not have a Privacy Policy set-up, this occurred with INTRANET sites! It only
happened to the IE6 users who had auto-updated thier browsers and applied
some security patch, and it only affected newly deployed intranet sites -
existing ones were fine.

Cheers
Adrian

 -Original Message-
 From: Gary Noone [SMTP:[EMAIL PROTECTED]]
 Sent: 25 April 2002 12:15
 To:   [EMAIL PROTECTED]
 Subject:  Cookies, sessions and proxy servers

 Hi all,

 Has anybody encountered a problem with proxy servers stripping cookies and
 therefore invalidating the session?

 We have deployed an application, and a number of customers complained that
 they were unable to login. On closer examination we found that the session
 object isNew() method returned true on each page of our application.

 I've noticed that JRUN uses ;jsessionID on the URL bar the first time that
 a
 session aware page is accessed. I guessed that this maybe to counter
 problems when the user had cookies switched off. However this does not
 seem
 to be the case.

 We can obviously code using URL re-writing, however I would have thought
 that this was a common problem and the servlet engine vendors would have a
 suitable fall back.

 Looking forward to any comments or insights.

 Best

 Gary

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

  http://archives.java.sun.com/jsp-interest.html
  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.jsp
  http://www.jguru.com/faq/index.jsp
  http://www.jspinsider.com

--
**
The Truworths e-mail facility may not be used for the distribution of
chain letters or offensive email.  Truworths hereby distances itself
from and accepts no liability for the unauthorised use of its e-mail
facility or the sending of e-mail communications for other than
strictly business purposes.  Truworths furthermore disclaims liability
for any unauthorised instruction for which permission was not granted.

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

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: Cookies, sessions and proxy servers

2002-04-26 Thread Gary Noone

Adrian--

Thanks for this. We also encountered the same problem with cookies and
IE6 -- it seems the default is cookies off.

Basically I now believe that the problem is with simple href links between
pages. I suspect these should be using encodeRedirectUrl in order to get the
;jSessionid=blah piece of the URL.

Thanks for the pointer though ...

-Original Message-
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Adrian Janssen
Sent: 26 April 2002 07:12
To: [EMAIL PROTECTED]
Subject: Re: Cookies, sessions and proxy servers


hey Gary,

Are you sure it is the proxy? I have encountered the exact same problem but
the cause was IE6 automatically disabling cokies becuase the web sitye did
not have a Privacy Policy set-up, this occurred with INTRANET sites! It only
happened to the IE6 users who had auto-updated thier browsers and applied
some security patch, and it only affected newly deployed intranet sites -
existing ones were fine.

Cheers
Adrian

 -Original Message-
 From: Gary Noone [SMTP:[EMAIL PROTECTED]]
 Sent: 25 April 2002 12:15
 To:   [EMAIL PROTECTED]
 Subject:  Cookies, sessions and proxy servers

 Hi all,

 Has anybody encountered a problem with proxy servers stripping cookies and
 therefore invalidating the session?

 We have deployed an application, and a number of customers complained that
 they were unable to login. On closer examination we found that the session
 object isNew() method returned true on each page of our application.

 I've noticed that JRUN uses ;jsessionID on the URL bar the first time that
 a
 session aware page is accessed. I guessed that this maybe to counter
 problems when the user had cookies switched off. However this does not
 seem
 to be the case.

 We can obviously code using URL re-writing, however I would have thought
 that this was a common problem and the servlet engine vendors would have a
 suitable fall back.

 Looking forward to any comments or insights.

 Best

 Gary

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

  http://archives.java.sun.com/jsp-interest.html
  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.jsp
  http://www.jguru.com/faq/index.jsp
  http://www.jspinsider.com

--
**
The Truworths e-mail facility may not be used for the distribution of
chain letters or offensive email.  Truworths hereby distances itself
from and accepts no liability for the unauthorised use of its e-mail
facility or the sending of e-mail communications for other than
strictly business purposes.  Truworths furthermore disclaims liability
for any unauthorised instruction for which permission was not granted.

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

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

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

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: Cookies in Tomcat with jsp's

2001-10-05 Thread Saurabh Shukla

You can use the send the cookie with response(HttpServletResponse).

Some thing like this..

public void sendCookie(HttpServletResponse ) {
Cookie cookie = new Cookie (COOKIEID,CookieValue);
cookie.setMaxAge (age);
resp.addCookie (cookie);
}

-Original Message-
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of SriHari
Sent: Friday, October 05, 2001 2:50 PM
To: [EMAIL PROTECTED]
Subject: Cookies in Tomcat with jsp's


Hai There

Can any one tell me how you are using Cookie concept in Tomcat using jsp's
i have to store a value on clients machine at the time of Logoff an catch
that value at the time of login in and do some process..

I just want to know that r u using  javascript or any other process for this



Regards
SriHari

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST
DIGEST.
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

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST.
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



Re: Cookies persistency

2001-07-25 Thread Jann VanOver

Antoine, did you mean that you open another window with the same browser?
Or did you really mean that you used a different browser?  The first case
SHOULD get the cookie, the second will NOT.

As Doug said -- if you create a cookie with netscape, you can't read it from
IE and vice versa.

-Original Message-
From: Doug Chamberlin [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 24, 2001 8:04 PM
To: [EMAIL PROTECTED]
Subject: Re: Cookies persistency


At 7/24/01 07:29 PM (Tuesday), Antoine Chemali wrote:
I am writing a simple login page with an option to save the username and
password through cookies. When I login and ask for the browser to save the
(user, pass), it
does it and I see the cookies coming back when I access a different page
(when in the same
browser). However, if I open another browser, it does not receive the
(user, pass)
cookies and therefore does not login. Any ideas why this is?

Why? Because that's the way it works. Cookies are specific to the browser
that was in use when they were created. How could it be otherwise?

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST
DIGEST.
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

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST.
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



Re: Cookies persistency

2001-07-25 Thread Antoine Chemali

Thanks. I meant opening another window with the same browser. I just
realized the age of the cookie was expiring immediately.

-Original Message-
From: Jann VanOver [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 25, 2001 9:43 AM
To: [EMAIL PROTECTED]
Subject: Re: Cookies persistency


Antoine, did you mean that you open another window with the same browser?
Or did you really mean that you used a different browser?  The first case
SHOULD get the cookie, the second will NOT.

As Doug said -- if you create a cookie with netscape, you can't read it from
IE and vice versa.

-Original Message-
From: Doug Chamberlin [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 24, 2001 8:04 PM
To: [EMAIL PROTECTED]
Subject: Re: Cookies persistency


At 7/24/01 07:29 PM (Tuesday), Antoine Chemali wrote:
I am writing a simple login page with an option to save the username and
password through cookies. When I login and ask for the browser to save the
(user, pass), it
does it and I see the cookies coming back when I access a different page
(when in the same
browser). However, if I open another browser, it does not receive the
(user, pass)
cookies and therefore does not login. Any ideas why this is?

Why? Because that's the way it works. Cookies are specific to the browser
that was in use when they were created. How could it be otherwise?

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST
DIGEST.
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

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST
DIGEST.
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

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST.
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



Re: Cookies persistency

2001-07-24 Thread Doug Chamberlin

At 7/24/01 07:29 PM (Tuesday), Antoine Chemali wrote:
I am writing a simple login page with an option to save the username and
password through cookies. When I login and ask for the browser to save the
(user, pass), it
does it and I see the cookies coming back when I access a different page
(when in the same
browser). However, if I open another browser, it does not receive the
(user, pass)
cookies and therefore does not login. Any ideas why this is?

Why? Because that's the way it works. Cookies are specific to the browser
that was in use when they were created. How could it be otherwise?

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST.
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



Re: Cookies: How to delete or expire a cookie.

2001-06-20 Thread umit

From my experince,a cookie cant be deleted,so you should set the value of
the cookie to some garbage value
or something else to simulate deletion.
- Original Message -
From: Shuja Nawaz [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, June 16, 2000 8:49 AM
Subject: Cookies: How to delete or expire a cookie.


 Hi.

 I have set the cookie in my JSP page to retrieve the UserName and
Password.
 It works fine. I can retrieve the cookie but when I try to delete it, it
 does't work.
 I want to delete the cookie when the user unchecks a checkbox on login
page.
 I have used the   setMaxAge(-1) and setMaxAge(0) methods but they don't
 work.

 Need the solution of this problem. May be some example or material can
help
 me.
 Thank you in anticipation.


 Thanks  Regards
 Shujah Nawaz
 Software Developer.
 Ph # 5584677-8.
 www.visualsoft-inc.com.


===
 To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
JSP-INTEREST.
 For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST
DIGEST.
 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


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST.
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



Re: Cookies: How to delete or expire a cookie.

2001-06-20 Thread Ron Quartel

http://www.jguru.com/faq/view.jsp?EID=763

-Original Message-
From: umit [mailto:[EMAIL PROTECTED]]
Sent: 20 June 2001 4:44
To: [EMAIL PROTECTED]
Subject: Re: Cookies: How to delete or expire a cookie.


From my experince,a cookie cant be deleted,so you should set the value of
the cookie to some garbage value
or something else to simulate deletion.
- Original Message -
From: Shuja Nawaz [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, June 16, 2000 8:49 AM
Subject: Cookies: How to delete or expire a cookie.


 Hi.

 I have set the cookie in my JSP page to retrieve the UserName and
Password.
 It works fine. I can retrieve the cookie but when I try to delete it, it
 does't work.
 I want to delete the cookie when the user unchecks a checkbox on login
page.
 I have used the   setMaxAge(-1) and setMaxAge(0) methods but they don't
 work.

 Need the solution of this problem. May be some example or material can
help
 me.
 Thank you in anticipation.


 Thanks  Regards
 Shujah Nawaz
 Software Developer.
 Ph # 5584677-8.
 www.visualsoft-inc.com.


===
 To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
JSP-INTEREST.
 For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST
DIGEST.
 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


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST
DIGEST.
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

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST.
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



Re: Cookies

2000-07-14 Thread Jay Thoden Van Velzen

Hi,

I don't think you can really, unless you use client side script, but you can
try and send one, then see if you can pick it up again using something like
this (in this case it writes to the Printwriter, but you could evaluate it
in your code somewhere and do some action on the basis of that):

...
Cookie[] cCookies = request.getCookies();
for (int n = 0; n  cCookies.length; n++)
{
out.println("p" + cCookies[n].getName() + "p");
{
...

That way you can see whether your cookie is accepted by th eclient and kept
in memory... (use .getValue() to get it's actual value)

Cheers
J

-Original Message-
From: anderson [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 04, 2000 4:16 PM
To: [EMAIL PROTECTED]
Subject: Cookies


Hi,

How can I get if the browser is able to receive cookies ?
If the cookies options in the browser is disable, the session beans
works ?

thanks
[]s
anderson

===
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

===
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



Re: Cookies

2000-07-04 Thread Mark G. Franz

Well, in ASP there is a Cookie Munger that will write a cookie for the
browser session only, I don't know about JSP.

Mark

-Original Message-
From: anderson [EMAIL PROTECTED]
To: [EMAIL PROTECTED] [EMAIL PROTECTED]
Date: Tuesday, July 04, 2000 11:14 AM
Subject: Cookies


Hi,

How can I get if the browser is able to receive cookies ?
If the cookies options in the browser is disable, the session beans
works ?

thanks
[]s
anderson

===
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


===
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



Re: Cookies in Tomcat

2000-06-12 Thread Dacian-Virgil Hantig
M.accessed(ctx, request, sessionId);
request.setRequestedSessionId(sessionId);
if (debug  0)
cm.log(" Final session id " + sessionId);
return sessionId;
}
}
return null;
}
}
===

Reinhard Pilz wrote:

 You can download the source of tomcat:
   http://jakarta.apache.org/builds/tomcat/release/v3.1/src/

 You'll need jakarta-ant.zip as it is the compiler for jakarta-tomcat.zip

  -Original Message-
  From: A mailing list about Java Server Pages specification and reference
  [mailto:[EMAIL PROTECTED]]On Behalf Of Dacian-Virgil Hantig
  Sent: Friday, June 09, 2000 18:38
  To: [EMAIL PROTECTED]
  Subject: Re: Cookies in Tomcat
 
 
Hi,
Could you tell me where did you find source codes or other
  documentation about Tomcat's implementation ?
 
   Unfortunately Tomcat3.1 only implements session tracking by
  cookies (As I
   understood when I studied the source code).
   I had the same problem and extended Tomcat by myself. I wrote a new
   SessionInterceptor and registered it in /conf/server.xml.
   Up to now I haven't experienced any side effects.
  
   reinhard pilz
  
-Original Message-
From: A mailing list about Java Server Pages specification
  and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Dacian-Virgil Hantig
Sent: Friday, June 09, 2000 14:10
To: [EMAIL PROTECTED]
Subject: Cookies in Tomcat
   
   
  Hi everybody,
   
  I'm experimenting some problems with Cookies in Tomcat. In
Documentation is written that the usage of cookies or URL Rewriting is
transparent for the user, but my program DOESN'T work if I
  have Cookies
Prompt and I click to the No when the browser asks me if I want a
Cookie. I can't use cookies (BOSS' REQUEST :)!
  The cookie in question is the JSESSIONID, probably is the SessionID
from the HttpSession, because without this cookie my session goes to
hell ... and back :) ... and all my beans are instantiated again, and
all my values are lost :(
   
  What can I do? Every little advice is welcome.
   
  Yours,
  Dacian
   
 
  ==
  =
  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
 

 ===
 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

===
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



Re: Cookies in Tomcat

2000-06-10 Thread Reinhard Pilz

You can download the source of tomcat:
  http://jakarta.apache.org/builds/tomcat/release/v3.1/src/

You'll need jakarta-ant.zip as it is the compiler for jakarta-tomcat.zip


 -Original Message-
 From: A mailing list about Java Server Pages specification and reference
 [mailto:[EMAIL PROTECTED]]On Behalf Of Dacian-Virgil Hantig
 Sent: Friday, June 09, 2000 18:38
 To: [EMAIL PROTECTED]
 Subject: Re: Cookies in Tomcat


   Hi,
   Could you tell me where did you find source codes or other
 documentation about Tomcat's implementation ?

  Unfortunately Tomcat3.1 only implements session tracking by
 cookies (As I
  understood when I studied the source code).
  I had the same problem and extended Tomcat by myself. I wrote a new
  SessionInterceptor and registered it in /conf/server.xml.
  Up to now I haven't experienced any side effects.
 
  reinhard pilz
 
   -Original Message-
   From: A mailing list about Java Server Pages specification
 and reference
   [mailto:[EMAIL PROTECTED]]On Behalf Of Dacian-Virgil Hantig
   Sent: Friday, June 09, 2000 14:10
   To: [EMAIL PROTECTED]
   Subject: Cookies in Tomcat
  
  
 Hi everybody,
  
 I'm experimenting some problems with Cookies in Tomcat. In
   Documentation is written that the usage of cookies or URL Rewriting is
   transparent for the user, but my program DOESN'T work if I
 have Cookies
   Prompt and I click to the No when the browser asks me if I want a
   Cookie. I can't use cookies (BOSS' REQUEST :)!
 The cookie in question is the JSESSIONID, probably is the SessionID
   from the HttpSession, because without this cookie my session goes to
   hell ... and back :) ... and all my beans are instantiated again, and
   all my values are lost :(
  
 What can I do? Every little advice is welcome.
  
 Yours,
 Dacian
  

 ==
 =
 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


===
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



Re: Cookies in Tomcat

2000-06-10 Thread Craig R. McClanahan

Reinhard Pilz wrote:

 Unfortunately Tomcat3.1 only implements session tracking by cookies (As I
 understood when I studied the source code).

This statement is not correct.  See class
org.apache.tomcat.core.HttpServletResponseFacade.java in the Tomcat 3.1 release,
where URL rewriting support is implemented in the encodeRedirectURL() and
encodeURL() methods.

There are issues with getting URL rewriting to work when you are using
Tomcat+Apache, because Apache does not correctly recognize the path parameter that
is used to pass the session ID.  The workaround is to use Apache's "mod_rewrite"
module.  See the FAQ-O-MATIC at http://jakarta.apache.org and do a search for
"url rewriting".

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



Re: Cookies in Tomcat

2000-06-09 Thread Reinhard Pilz

Unfortunately Tomcat3.1 only implements session tracking by cookies (As I
understood when I studied the source code).
I had the same problem and extended Tomcat by myself. I wrote a new
SessionInterceptor and registered it in /conf/server.xml.
Up to now I haven't experienced any side effects.

reinhard pilz

 -Original Message-
 From: A mailing list about Java Server Pages specification and reference
 [mailto:[EMAIL PROTECTED]]On Behalf Of Dacian-Virgil Hantig
 Sent: Friday, June 09, 2000 14:10
 To: [EMAIL PROTECTED]
 Subject: Cookies in Tomcat


   Hi everybody,

   I'm experimenting some problems with Cookies in Tomcat. In
 Documentation is written that the usage of cookies or URL Rewriting is
 transparent for the user, but my program DOESN'T work if I have Cookies
 Prompt and I click to the No when the browser asks me if I want a
 Cookie. I can't use cookies (BOSS' REQUEST :)!
   The cookie in question is the JSESSIONID, probably is the SessionID
 from the HttpSession, because without this cookie my session goes to
 hell ... and back :) ... and all my beans are instantiated again, and
 all my values are lost :(

   What can I do? Every little advice is welcome.

   Yours,
   Dacian

 ==
 =
 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


===
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



Re: Cookies in Tomcat

2000-06-09 Thread Dacian-Virgil Hantig

  Hi,
  Could you tell me where did you find source codes or other
documentation about Tomcat's implementation ?

 Unfortunately Tomcat3.1 only implements session tracking by cookies (As I
 understood when I studied the source code).
 I had the same problem and extended Tomcat by myself. I wrote a new
 SessionInterceptor and registered it in /conf/server.xml.
 Up to now I haven't experienced any side effects.

 reinhard pilz

  -Original Message-
  From: A mailing list about Java Server Pages specification and reference
  [mailto:[EMAIL PROTECTED]]On Behalf Of Dacian-Virgil Hantig
  Sent: Friday, June 09, 2000 14:10
  To: [EMAIL PROTECTED]
  Subject: Cookies in Tomcat
 
 
Hi everybody,
 
I'm experimenting some problems with Cookies in Tomcat. In
  Documentation is written that the usage of cookies or URL Rewriting is
  transparent for the user, but my program DOESN'T work if I have Cookies
  Prompt and I click to the No when the browser asks me if I want a
  Cookie. I can't use cookies (BOSS' REQUEST :)!
The cookie in question is the JSESSIONID, probably is the SessionID
  from the HttpSession, because without this cookie my session goes to
  hell ... and back :) ... and all my beans are instantiated again, and
  all my values are lost :(
 
What can I do? Every little advice is welcome.
 
Yours,
Dacian
 

===
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



Re: cookies and redirects

2000-05-17 Thread Fred Durham

I had this problem also. The cookie path and domain seemed to have been set
in such a way that the cookie was not "seen" buy the redirected-to page.

I added setPath and setDomain like this:

Cookie c = new Cookie("rememberme", "checked");
c.setMaxAge(24*365*60*60);
c.setPath("/");
c.setDomain(".cafepress.com");
response.addCookie(c);


and the problem was solved


-fred



 I am having the same problem as below.  I set a cookie on login, then
 redirect to the appropriate page without even writing a single line to the
 output stream and the cookie does not get set.  Is there any way to get
 around this?

 Travis

 On Mon, 17 Apr 2000 08:10:21 -0400, Jerry Denman [EMAIL PROTECTED]
wrote:

 Without seeing your code I can only make a guess - all cookie operations
 typically must take place within the HEAD/HEAD tags.  Most often the
 cookie will not set if done in any other portion of the HTML code.
 
 Hope that helps
 
 Jerry M Denman
 Management Information Consulting
 
 -Original Message-
 From: Mr. Srinivas Rao [mailto:[EMAIL PROTECTED]]
 Sent: Monday, April 17, 2000 7:54 AM
 To: [EMAIL PROTECTED]
 Subject: JSP query with cookies setting
 
 
 hi,
 I am facing very strange problem that is I am using jsp with tomcat web
 server.
 
 I am trying to add certain cookies on certain conditions.  I am able to
do
 it as per my wish if I just let the page go on its flow..but if i am
trying
 to redirect the page after adding the cookie, it wont add the cookie
 althought redirecting the page properly and doing all other things in the
 required manner.
 
 Please try to find the solution and mail me..
 
 Regards
 
 ES Rao

 Travis Reeder
 Director, Internet Technologies
 Xabre.com


===
 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

===
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



Re: cookies and redirects

2000-05-16 Thread Travis Reeder

I am having the same problem as below.  I set a cookie on login, then
redirect to the appropriate page without even writing a single line to the
output stream and the cookie does not get set.  Is there any way to get
around this?

Travis

On Mon, 17 Apr 2000 08:10:21 -0400, Jerry Denman [EMAIL PROTECTED] wrote:

Without seeing your code I can only make a guess - all cookie operations
typically must take place within the HEAD/HEAD tags.  Most often the
cookie will not set if done in any other portion of the HTML code.

Hope that helps

Jerry M Denman
Management Information Consulting

-Original Message-
From: Mr. Srinivas Rao [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 17, 2000 7:54 AM
To: [EMAIL PROTECTED]
Subject: JSP query with cookies setting


hi,
I am facing very strange problem that is I am using jsp with tomcat web
server.

I am trying to add certain cookies on certain conditions.  I am able to do
it as per my wish if I just let the page go on its flow..but if i am trying
to redirect the page after adding the cookie, it wont add the cookie
althought redirecting the page properly and doing all other things in the
required manner.

Please try to find the solution and mail me..

Regards

ES Rao

Travis Reeder
Director, Internet Technologies
Xabre.com

===
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



Re: cookies

2000-04-13 Thread Sreenivasa Majji [TEMP]

You might some info on cookies at cookiecentral.com

-Kumar

|Content-Transfer-Encoding: 7bit
|X-Priority: 3
|X-MSMail-Priority: Normal
|X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
|Subject: cookies
|To: [EMAIL PROTECTED]
|
|hello every body
|
|Can any body give me information how to acess cookies from jsp.
|kindly give me some info on this.
|thanks
|
|your faithfully,
|srinivas
|
|===
|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

===
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



Re: cookies

2000-04-13 Thread Patricio Otamendi

This code sends a cookie to the browser:

// Create de cookie
   Cookie cookieTest = new Cookie("MyName","MyValue");

// Sends de cookie
   response.addCookie(cookieTest);

This code get a cookie from the browser:

javax.servlet.http.Cookie cookies[];
cookies = request.getCookies();

if (cookies != null)
{
  for (int i= 0; i  cookies.length; i++)
  {
if (cookies[i].getName().equals("MyName"))
{
  System.out.println(cookies[i].getName());
  System.out.println(cookies[i].getValue());
  break;
}
  }
}



At 12:45 AM 4/14/00 +0530, you wrote:
hello every body

Can any body give me information how to acess cookies from jsp.
kindly give me some info on this.
thanks

your faithfully,
srinivas

===
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




===
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



Re: Cookies

2000-03-28 Thread Shrisha Radhakrishna

Is this is a typo?  U R saying (!!!)

if ((cookies == null) || (cookies.length == 0))
{
%
display cookies
%}%

It should be...
if ((cookies == null) || (cookies.length == 0))
{
%
Display "Cookies not found..."
%}
else
{
Display all cookies...
}
%


- Original Message -
From: "Beck, Matthew" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, March 28, 2000 12:12 PM
Subject: Cookies


 I'm working with JSWDK 1.0.1 and have to simple JSP pages for testing
cookie
 reading and writing (copied below).  I turn on warnings about cookies in
IE
 and can inspect the contents of the cookie coming down to my browser.
 However, when I look for cookies coming back to the server there are none.
 I'm suspicious that the problem is related to running on
 http://localhost:8080/ http://localhost:8080/  rather than a "real"
 domain.  Anyone seen similar behavior?  Recommendations???

 -Matthew

 PutCookie.jsp:
 %
 Cookie ts = new Cookie("CookieTime",(new java.util.Date()).toString());
 response.addCookie(ts);
 %
 html
 head
 titleUntitled Document/title
 meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"
 /head

 body bgcolor="#FF"
 Sending Cookies
 /body
 /html

 GetCookies.jsp:
 %
 System.out.println("Received page request");

 Cookie cookies[] = request.getCookies();
 %
 html
 head
 titleUntitled Document/title
 meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"
 /head

 body bgcolor="#FF"
 %
 if ((cookies == null) || (cookies.length == 0))
 {
 %
 pFound %=cookies.length% cookies/p
 table width="100%" border="1"
   tr
 tdName/td
 tdValue/td
 tdComment/td
 tdMax Age/td
   /tr
 %
  for (int i=0; i  cookies.length; i++)
  {
   Cookie c = cookies[i];
   System.out.println("Name: " + c.getName() + " Value: " + c.getValue() +
"
 MaxAge: " + c.getMaxAge());
 %
   tr
 td%=c.getName()%/td
 td%=c.getValue()%/td
 td%=c.getComment()%/td
 td%=c.getMaxAge()%/td
   /tr
 %
  }
 %
 /table
 pnbsp;/p
 pnbsp; /p
 %
 }
 else
 {
  System.out.println("NO COOKIES FOUND");
 %No Cookies Found%
 }
 %
 /body
 /html


===
 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


__
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com

===
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



Re: Cookies

2000-03-28 Thread Beck, Matthew

Wow, I feel really stupid now!  That's exactly it.  Like finding that extra
;  Thank you VERY much

-Original Message-
From: Shrisha Radhakrishna [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 28, 2000 4:06 PM
To: [EMAIL PROTECTED]
Subject: Re: Cookies


Is this is a typo?  U R saying (!!!)

if ((cookies == null) || (cookies.length == 0))
{
%
display cookies
%}%

It should be...
if ((cookies == null) || (cookies.length == 0))
{
%
Display "Cookies not found..."
%}
else
{
Display all cookies...
}
%


- Original Message -
From: "Beck, Matthew" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, March 28, 2000 12:12 PM
Subject: Cookies


 I'm working with JSWDK 1.0.1 and have to simple JSP pages for testing
cookie
 reading and writing (copied below).  I turn on warnings about cookies in
IE
 and can inspect the contents of the cookie coming down to my browser.
 However, when I look for cookies coming back to the server there are none.
 I'm suspicious that the problem is related to running on
 http://localhost:8080/ http://localhost:8080/  rather than a "real"
 domain.  Anyone seen similar behavior?  Recommendations???

 -Matthew

 PutCookie.jsp:
 %
 Cookie ts = new Cookie("CookieTime",(new java.util.Date()).toString());
 response.addCookie(ts);
 %
 html
 head
 titleUntitled Document/title
 meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"
 /head

 body bgcolor="#FF"
 Sending Cookies
 /body
 /html

 GetCookies.jsp:
 %
 System.out.println("Received page request");

 Cookie cookies[] = request.getCookies();
 %
 html
 head
 titleUntitled Document/title
 meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"
 /head

 body bgcolor="#FF"
 %
 if ((cookies == null) || (cookies.length == 0))
 {
 %
 pFound %=cookies.length% cookies/p
 table width="100%" border="1"
   tr
 tdName/td
 tdValue/td
 tdComment/td
 tdMax Age/td
   /tr
 %
  for (int i=0; i  cookies.length; i++)
  {
   Cookie c = cookies[i];
   System.out.println("Name: " + c.getName() + " Value: " + c.getValue() +
"
 MaxAge: " + c.getMaxAge());
 %
   tr
 td%=c.getName()%/td
 td%=c.getValue()%/td
 td%=c.getComment()%/td
 td%=c.getMaxAge()%/td
   /tr
 %
  }
 %
 /table
 pnbsp;/p
 pnbsp; /p
 %
 }
 else
 {
  System.out.println("NO COOKIES FOUND");
 %No Cookies Found%
 }
 %
 /body
 /html


===
 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


__
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com

===
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

===
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



Re: Cookies.

2000-02-16 Thread Christian Bernard

Hi,

We had the same problem with Tomcat 3.0/Nt 4.0.
We are currently using the following workaround (three commented lines) in the
org.apache.tomcat.util and it seems to work well :

 protected MimeHeaderField putHeader(String name) {
//  if (containsHeader(name)) {
// removeHeader(name);
// }

 return addHeader(name);
 }

Christian

"ARORA SUMEET (MSD_MAT)" a écrit :

 thanks arun,

 my specific question was that i wanted three cookies to be set in my
 application.
 i am finding that only the one i am setting the last is going to the client
 and that is the only one available to me later on when i read it back.
 it is that in tomcat on nt, i am able to set only one cookie.

 i have still not overcome the problem of setting three cookies. any help
 will be appreciated.
 i was able to change the value of the cookie.

 -SA

  -Original Message-
  From: Arun Thomas [SMTP:[EMAIL PROTECTED]]
  Sent: Tuesday, February 15, 2000 3:37 AM
  To:   ARORA SUMEET (MSD_MAT)
  Cc:   JSP Mail List
  Subject:  RE: Cookies.
  Sensitivity:  Confidential
 
  Sumeet,
 
  The standard way to replace a cookie is to add a new cookie with the same
  path and domain which has the maxAge set to 0 (i.e. expire immediately).
  The old
  cookie is therefore replaced by the
  new cookie which then immediately expires.
 
  -AMT
 
   -Original Message-
   From: A mailing list about Java Server Pages specification and reference
   [mailto:[EMAIL PROTECTED]]On Behalf Of ARORA SUMEET (MSD_MAT)
   Sent: Friday, February 11, 2000 10:56 PM
   To: [EMAIL PROTECTED]
   Subject: Cookies.
   Importance: High
   Sensitivity: Confidential
  
  
   hi list
   I have a couple of doubts wrt cookies. I use tomcat and win/nt
  
   1.
   I am trying to use multiple cookies for my project.
   However i am finding that the cookie that i am setting last is
   the only one
   getting sent.
   Any particular reason why this is happenning. any solution
   eg. code
  
   Cookie uidCookie = new Cookie("TMX_CUID", uname);
   Cookie sidCookie = new Cookie("TMX_SID", sid);
   Cookie cidCookie = new Cookie("TMX_CUSTCODE", custCode);
  
   response.addCookie(uidCookie);
   response.addCookie(sidCookie);
   response.addCookie(cidCookie);
  
   only cidCookie is what i am able to access later on.
  
  
  
   2.
   Are there are no methods to remove a cookie.
   All i could find was cookie.setValue();
   I want to remove all these at the time i logout.
   i tried getting the cookie and cookie.setValue(null); but it is not
   happenning. any particular reasons.
   are there better ways of doing this.
  
  
  
   TIA
  
   Sumeet
  
   ==
   =
   To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
   JSP-INTEREST".
   FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
  

 ===
 To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
 FAQs on JSP can be found at:
  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.html

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html



Re: Cookies.

2000-02-15 Thread ARORA SUMEET (MSD_MAT)

thanks arun,

my specific question was that i wanted three cookies to be set in my
application.
i am finding that only the one i am setting the last is going to the client
and that is the only one available to me later on when i read it back.
it is that in tomcat on nt, i am able to set only one cookie.

i have still not overcome the problem of setting three cookies. any help
will be appreciated.
i was able to change the value of the cookie.

-SA



 -Original Message-
 From: Arun Thomas [SMTP:[EMAIL PROTECTED]]
 Sent: Tuesday, February 15, 2000 3:37 AM
 To:   ARORA SUMEET (MSD_MAT)
 Cc:   JSP Mail List
 Subject:  RE: Cookies.
 Sensitivity:  Confidential

 Sumeet,

 The standard way to replace a cookie is to add a new cookie with the same
 path and domain which has the maxAge set to 0 (i.e. expire immediately).
 The old
 cookie is therefore replaced by the
 new cookie which then immediately expires.

 -AMT

  -Original Message-
  From: A mailing list about Java Server Pages specification and reference
  [mailto:[EMAIL PROTECTED]]On Behalf Of ARORA SUMEET (MSD_MAT)
  Sent: Friday, February 11, 2000 10:56 PM
  To: [EMAIL PROTECTED]
  Subject: Cookies.
  Importance: High
  Sensitivity: Confidential
 
 
  hi list
  I have a couple of doubts wrt cookies. I use tomcat and win/nt
 
  1.
  I am trying to use multiple cookies for my project.
  However i am finding that the cookie that i am setting last is
  the only one
  getting sent.
  Any particular reason why this is happenning. any solution
  eg. code
 
  Cookie uidCookie = new Cookie("TMX_CUID", uname);
  Cookie sidCookie = new Cookie("TMX_SID", sid);
  Cookie cidCookie = new Cookie("TMX_CUSTCODE", custCode);
 
  response.addCookie(uidCookie);
  response.addCookie(sidCookie);
  response.addCookie(cidCookie);
 
  only cidCookie is what i am able to access later on.
 
 
 
  2.
  Are there are no methods to remove a cookie.
  All i could find was cookie.setValue();
  I want to remove all these at the time i logout.
  i tried getting the cookie and cookie.setValue(null); but it is not
  happenning. any particular reasons.
  are there better ways of doing this.
 
 
 
  TIA
 
  Sumeet
 
  ==
  =
  To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
  JSP-INTEREST".
  FAQs on JSP can be found at:
   http://java.sun.com/products/jsp/faq.html
   http://www.esperanto.org.nz/jsp/jspfaq.html
 

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html



Re: Cookies.

2000-02-15 Thread Richard Yee

Arora,
   Why do you insist on setting three separate cookies instead of one cookie
that contains the three values?  You can't set different cookies from the
same URL.  You should just combine the three values into one and set that
value into a single cookie.  Separate the values with a distinguishing
character and use the StringTokenizer to parse the values.

-Richard



Richard Yee
DMC1 Corporation
305 W. Evelyn Ave.
Mtn. View, CA. 94041
650-963-3116
[EMAIL PROTECTED]




-Original Message-
From: ARORA SUMEET (MSD_MAT) [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 14, 2000 7:51 PM
To: [EMAIL PROTECTED]
Subject: Re: Cookies.
Importance: High
Sensitivity: Confidential


thanks arun,

my specific question was that i wanted three cookies to be set in my
application.
i am finding that only the one i am setting the last is going to the client
and that is the only one available to me later on when i read it back.
it is that in tomcat on nt, i am able to set only one cookie.

i have still not overcome the problem of setting three cookies. any help
will be appreciated.
i was able to change the value of the cookie.

-SA



 -Original Message-
 From: Arun Thomas [SMTP:[EMAIL PROTECTED]]
 Sent: Tuesday, February 15, 2000 3:37 AM
 To:   ARORA SUMEET (MSD_MAT)
 Cc:   JSP Mail List
 Subject:  RE: Cookies.
 Sensitivity:  Confidential

 Sumeet,

 The standard way to replace a cookie is to add a new cookie with the same
 path and domain which has the maxAge set to 0 (i.e. expire immediately).
 The old
 cookie is therefore replaced by the
 new cookie which then immediately expires.

 -AMT

  -Original Message-
  From: A mailing list about Java Server Pages specification and reference
  [mailto:[EMAIL PROTECTED]]On Behalf Of ARORA SUMEET (MSD_MAT)
  Sent: Friday, February 11, 2000 10:56 PM
  To: [EMAIL PROTECTED]
  Subject: Cookies.
  Importance: High
  Sensitivity: Confidential
 
 
  hi list
  I have a couple of doubts wrt cookies. I use tomcat and win/nt
 
  1.
  I am trying to use multiple cookies for my project.
  However i am finding that the cookie that i am setting last is
  the only one
  getting sent.
  Any particular reason why this is happenning. any solution
  eg. code
 
  Cookie uidCookie = new Cookie("TMX_CUID", uname);
  Cookie sidCookie = new Cookie("TMX_SID", sid);
  Cookie cidCookie = new Cookie("TMX_CUSTCODE", custCode);
 
  response.addCookie(uidCookie);
  response.addCookie(sidCookie);
  response.addCookie(cidCookie);
 
  only cidCookie is what i am able to access later on.
 
 
 
  2.
  Are there are no methods to remove a cookie.
  All i could find was cookie.setValue();
  I want to remove all these at the time i logout.
  i tried getting the cookie and cookie.setValue(null); but it is not
  happenning. any particular reasons.
  are there better ways of doing this.
 
 
 
  TIA
 
  Sumeet
 
  ==
  =
  To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
  JSP-INTEREST".
  FAQs on JSP can be found at:
   http://java.sun.com/products/jsp/faq.html
   http://www.esperanto.org.nz/jsp/jspfaq.html
 

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html



Re: Cookies.

2000-02-14 Thread Arun Thomas

Sumeet,

The standard way to replace a cookie is to add a new cookie with the same
path and domain which has the maxAge set to 0 (i.e. expire immediately).
The old
cookie is therefore replaced by the
new cookie which then immediately expires.

-AMT

 -Original Message-
 From: A mailing list about Java Server Pages specification and reference
 [mailto:[EMAIL PROTECTED]]On Behalf Of ARORA SUMEET (MSD_MAT)
 Sent: Friday, February 11, 2000 10:56 PM
 To: [EMAIL PROTECTED]
 Subject: Cookies.
 Importance: High
 Sensitivity: Confidential


 hi list
 I have a couple of doubts wrt cookies. I use tomcat and win/nt

 1.
 I am trying to use multiple cookies for my project.
 However i am finding that the cookie that i am setting last is
 the only one
 getting sent.
 Any particular reason why this is happenning. any solution
 eg. code

 Cookie uidCookie = new Cookie("TMX_CUID", uname);
 Cookie sidCookie = new Cookie("TMX_SID", sid);
 Cookie cidCookie = new Cookie("TMX_CUSTCODE", custCode);

 response.addCookie(uidCookie);
 response.addCookie(sidCookie);
 response.addCookie(cidCookie);

 only cidCookie is what i am able to access later on.



 2.
 Are there are no methods to remove a cookie.
 All i could find was cookie.setValue();
 I want to remove all these at the time i logout.
 i tried getting the cookie and cookie.setValue(null); but it is not
 happenning. any particular reasons.
 are there better ways of doing this.



 TIA

 Sumeet

 ==
 =
 To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
 JSP-INTEREST".
 FAQs on JSP can be found at:
  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.html


===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html



Re: Cookies

2000-02-05 Thread Richard Vowles

Have you tried the FAQ? Specifically question 39?

- Original Message -
From: Michael Parcewski [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, March 04, 2000 5:11 AM
Subject: Cookies


 I've checked everywhere else and have come up empty, so I'll try here.

 here's my problem, we do some branding on our site and we wanted to use
 cookies to persist branding when users return to the site.

 We decided, since there's no other way, to use cookies, but I'm having a
 problem.  I can set the cookie, but can't disable it.  Take a look at the
 code below, and see if you can help me out.


 /// This logs in a user and creates a session (session code taken out)

 if ("Log-In".equals(request.getParameter("action") {

Cookie c = new Cookie("firstName",
 student.getFirstName());
 c.setMaxAge(364*24*60*60);
 response.addCookie(c);

if
(student.getAffiliation().getPrimaryKey()
 != null) {

 Cookie c2 = new Cookie("schoolId",
 student.getAffiliation().getPrimaryKey().toString());
 c2.setMaxAge(364*24*60*60);
 response.addCookie(c2);
 }

 // This is supposed to disable cookie (but doesn't)

 if ("disable_cookie".equals(request.getParameter("action"))) {

 Cookie c3[] = request.getCookies();

   for (int i = 0; i  c3.length; i++) {
   out.println("should expire");
 c3[i].setMaxAge(0);
   }
 }


===
 To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
 FAQs on JSP can be found at:
  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.html

---
Richard Vowles, Infrastructure Architect, Inprise New Zealand
home-email: "mailto:[EMAIL PROTECTED], work-email: "[EMAIL PROTECTED]"
"Is it not a foolish man who puts all his chickens down his trousers" -
Alexi Sayle, Panic

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html



Re: Cookies For Session Management, Is It JRun?

1999-09-08 Thread DAVE TOWNSEND

From what I understand of how cookies work, they are specified for a
particular site. I would assume that a browser would see
hostname.domainname.com:8000 and hostname.domainname.com as being two
separate sites, and so cookies it recieves from one will not be sent to the
other. Whatever, I would expect this to be a browser issue rather than a
server one.

Dave


 -Original Message-
 From: Ball, Stephen [mailto:[EMAIL PROTECTED]]
 Sent: 08 September 1999 13:22
 To: [EMAIL PROTECTED]
 Subject: Cookies For Session Management, Is It JRun?


 Hello All,
 I don't know if this has already been discussed, but
 I am constantly
 running into a "situation".  I am  maintaining a base url
 throughout my
 session.  (hostname.domainname.com:8000)  I rely on this url
 for all types
 of navigation.  On occasion, myself or another user will use
 an equivalent
 valid machine name for our intranet, be it an IP address or
 just a local
 hostname to access the site.  As session objects are being
 "put" and then
 "get", I get all sorts of null session objects.  After
 checking it out, I
 realized that the IP address, the local hostname, the fully
 qualified name
 are all maintaining different sessions.  Therefore all
 session objects under
 the IP address are maintained under a seperate cookie from the session
 objects maintained under the hostname.   Is this part of
 the spec?  Is
 this a JRun issue only?  Do I just need to come up with a
 best practice for
 coding around this?

 Thanks In Advance,

 Stephen C. Ball
 Consultant, Software Architects, Inc.
 [EMAIL PROTECTED]

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html



Re: Cookies For Session Management, Is It JRun?

1999-09-08 Thread Lance Lavandowska

As I understand it, this is part of the "spec" for cookies.  When they are
set, there is a "domain" portion, that if not specified defaults to the
root of the http request.  So, by calling the page by different addresses
you will get a seperate cookie for each one, unless you specifically set
the cookie's domain.

See
http://java.sun.com/products/servlet/2.1/api/javax.servlet.http.Cookie.htm
l

But then only the specified host will be able to see the Cookie, others
won't get a Cookie at all.

Lance Lavandowska
Software Engineer
http://www.AgDomain.Com

-Original Message-
From: Ball, Stephen [EMAIL PROTECTED]
To: [EMAIL PROTECTED] [EMAIL PROTECTED]
Date: Wednesday, September 08, 1999 7:39 AM
Subject: Cookies For Session Management, Is It JRun?


Hello All,
I don't know if this has already been discussed, but I am
constantly
running into a "situation".  I am  maintaining a base url throughout my
session.  (hostname.domainname.com:8000)  I rely on this url for all
types
of navigation.  On occasion, myself or another user will use an
equivalent
valid machine name for our intranet, be it an IP address or just a local
hostname to access the site.  As session objects are being "put" and then
"get", I get all sorts of null session objects.  After checking it out, I
realized that the IP address, the local hostname, the fully qualified
name
are all maintaining different sessions.  Therefore all session objects
under
the IP address are maintained under a seperate cookie from the session
objects maintained under the hostname.   Is this part of the spec?
Is
this a JRun issue only?  Do I just need to come up with a best practice
for
coding around this?

Thanks In Advance,

Stephen C. Ball
Consultant, Software Architects, Inc.
[EMAIL PROTECTED]

=
==
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html


===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html