scussion about Sun Microsystem's Java Servlet
API Technology. [mailto:[EMAIL PROTECTED] Behalf Of Eric
Noriega
Sent: Saturday, February 15, 2003 11:09 AM
To: [EMAIL PROTECTED]
Subject: Re: Cookie
What do you mean "change the name of the cookie?" Are you doing an
res.addCookie() w
e, as someone suggested, pls iterate thro the Cookie array and you will
get to see all those that are set.
-Original Message-
From: Shivani [mailto:[EMAIL PROTECTED]
Sent: Saturday, February 15, 2003 5:25 PM
To: [EMAIL PROTECTED]
Subject: Re: Cookie
instead of:
Cookie myCookie= new Cookie
ly. is this the supposed to
be behaviour?
not understanding here..
-Original Message-
From: A mailing list for discussion about Sun Microsystem's Java Servlet
API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Eric
Noriega
Sent: Saturday, February 15, 2003 11:09 AM
To: [EMAIL PRO
What do you mean "change the name of the cookie?" Are you doing an
res.addCookie() with another name?
Shivani wrote:
HI,
i am setting cookie parameters and retriving them in same servlet for
testing cookie class.
however, if i change name of cookie i have set and run this servlet, it
doesn
Why don't you iterate through the entire array returned by
req.getCookies()? When you change the cookie name, it doesn't replace the
existing cookie. I would expect that getCookies is returning an array with
two elements in it.
Regards,
Richard
At 04:31 PM 2/14/2003 -0800, you wrote:
HI,
i am
Thanks Pramod, Vikramjit, Siddharth, and Chris... works like a charm now!
Best regards!!!
Mike
-Original Message-
From: A mailing list for discussion about Sun Microsystem's Java Servlet
API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Mike
Cronin
Sent: Tuesday, September 17, 2002
For safety sake you should also check cookies.length > 0 before you
reference cookies[0].
(*Chris*)
- Original Message -
From: "Siddharth" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, September 17, 2002 9:49 PM
Subject: Re: [SERVLET-INTEREST] Cookie help...
> Mike,
>
> C
Mike,
Check if var. "cookies" is null...
and if is null then
It must be throwing NullPointerException... so check your log.
siddharth
- Original Message -
From: Mike Cronin <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, September 18, 2002 6:34 AM
Subject: Cookie help...
Hi,
Had tried your code, and it is giving NullPointerException, when you are
trying to get the name of the cookies because your cookies == null.
Try this code:
package doccookietest;
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.IOException;
public class CookieServlet ex
If the request does not contain any cookies, request.getCookies() returns a
null value...Maybe thats why you cant see any println's. If you look into
your server logs you just might find a NullPointerException thrown at the
line where you've written
> System.out.println("(4) The first cookie i
Hai all,
What is null cookie and any new about it.
thanx in advance.
Jaishankar
___
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://
if i am not wrong then :
u can not delte cookie.you have to write another cookie with same name .
previous wiill get destroyied.
-Original Message-
From: Sameer <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Thursday, December 21, 2000 5:34 PM
Subject: Cookie Deletion
I think what u want to do is
first
response.sendRedirect();
and then
response.addCookie(CookieObj)
Mittal.
- Original Message -
From: Sujoy <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, November 08, 2000 6:53 AM
Subject: Re: Cookie Problem ??
> Hi Kavit
Sujoy wrote:
>
> Well first of all I wanna know does cookie work
> with res.sendRedirect(..) ??
>
Check the archives with search terms "cookie"
and "redirect".
___
To unsubscribe, send email to [EMAIL PROTECTED] and include
To: <[EMAIL PROTECTED]>
Sent: Wednesday, November 08, 2000 7:52 PM
Subject: Re: Cookie Problem ??
> Did you set the path , domain, age of the cookie.
> Try to list the cookies in the server and see whether cookie is created
> really.
>
> Kavitha
> - Original Message -
Did you set the path , domain, age of the cookie.
Try to list the cookies in the server and see whether cookie is created
really.
Kavitha
- Original Message -
From: "Sujoy" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, November 08, 2000 2:10 AM
Subject: Cookie Problem ??
Thank you.
I serch c:\windows\profiles\cookies
But I coludn't find cooke that was sened by werServer.
And I tried value
set.MaxAge()
1,10,-1ets
Dose anybody have code,can make cookies in client HDD.
> I'm not using Win95 right now, so I cannot be sure about this information.
> But you can
I am reading the cookie from the server in my client
application. This I can do. It's using the cookie in
subsequent requests that is failing.
While your thoughts would work on the server-side, it
won't work in my case.
Thanks.
--- "Jan Andresen [elkware]" <[EMAIL PROTECTED]>
wrote:
> Hi Phil
an Andresen [elkware] [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, August 27, 2000 12:10 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Cookie frustration.
>
>
> Hi Phillip!
>
> What are you acutally trying to do ?
> Read the value of a cookie or set a cookie ?
>
> Get the value
Hi Phillip!
What are you acutally trying to do ?
Read the value of a cookie or set a cookie ?
Get the value of a cookie with:
Cookie cookies[] = request.getCookies();
String cookieValue=null;
if (cookies!=null){
for (int i=0; i< cookies.length; i++)
if (cookies[i].getName().equals("
hi,
what my advice to u is try to avoid the use of cookies any way, upto my
knowleged age of the cookie is upto the browser
ends or exits and u can set the max age in milliseconds( hope u know). A 0
indicates delete the cookie immediately,
I read one thing in JasonHunter pg.204 what it's tell
Hi,
See below for reply..
> Hi,
>
> I have used Cookies instead of Session.
> So what is the default Age of a Cookie.
the following is taken from the API docs..
" setMaxAge
public void setMaxAge(int expiry)
Sets the maximum age of the cookie. The cookie will expire after that many
seconds have
>>> kumar Shanmugam <[EMAIL PROTECTED]> 19-Jul-00 1:15:01
PM >>>
>If cookies are disabled, u can go for either URL rewriting
>or thru form based hide variable.
No you can't. URL re-writing is the only way. A form based variable
can include the session id but you have no way of getting the sessio
>>> Prakash Sandeep <[EMAIL PROTECTED]> 04-Jul-00 12:52:53 PM >>>
>Question
>Q1...Can a two cookie be created by same name in
>a single servlet ?
>Q2...Can a two cookie be created by same name in a
>different servlet deployed on same web server ?
What is "a two cookie"?
Do you mean can cookies
essage-
> From: A mailing list for discussion about Sun Microsystem's Java Servlet
> API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Milt
> Epstein
> Sent: Tuesday, May 23, 2000 7:53 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Cookie Problem
>
>
> On T
On Wed, 24 May 2000, Andy Dingfelder wrote:
> Yea, I read that too, and it confused me. The reason that it confused me to
> say that
> "The get methods are rarely used" is because the get methods are then used 2
> pages later.
> (getCookies, getName & getValue)
>
> If we are not supposed to get t
stein
Sent: Tuesday, May 23, 2000 7:53 PM
To: [EMAIL PROTECTED]
Subject: Re: Cookie Problem
On Thu, 18 May 2000, Andy Dingfelder wrote:
> Here is how I am setting the cookie:
>
> java.io.PrintWriter out = response.getWriter();
> Cookie[] cookies = request.getCookies
llowing methods are used to set these
attributes. As you can see in Appendix B, HTTP Servlet API Quick
Reference, there is a corresponding get method for each set method.
The get methods are rarely used, however, because when a cookie is
sent to the server, it contains only its name, v
It looks ok to me... any ideas ?
-Original Message-
From: Kevin Mukhar [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 17, 2000 5:29 PM
To: Andrew Dingfelder
Subject: Re: Cookie Problem
Andrew Dingfelder wrote:
>
> I am having a little trouble setting cookies from my
>
Im using Java Web Server 1.1.3
Andy
-Original Message-
From: A mailing list for discussion about Sun Microsystem's Java Servlet
API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Shawn
McKisson
Sent: Thursday, May 18, 2000 2:38 AM
To: [EMAIL PROTECTED]
Subject: Re: Cookie Pr
A while ago (when livesoftware owned jrun) I ran into a situation where I
could not get the jrun webserver to handle cookies correctly. When I ran the
same code under apache and websphere, it worked as expected. I apologize for
not having the jrun version handy.
I'm not sure that this is your pro
Nic Ferrier wrote:
> >>> Perry Hoekstra <[EMAIL PROTECTED]> 21-Apr-00 6:51:41 PM
> >>>
>
> >Here is where my confusion lies
> > t_urlConnection.setRequestProperty("Set-Cookie",
> "somekey=somevalue");
> >or
> > t_urlConnection.setRequestProperty("somekey", "somevalue");
> > t_urlConnection.conn
>>> Perry Hoekstra <[EMAIL PROTECTED]> 21-Apr-00 6:51:41 PM
>>>
>Here is where my confusion lies
> t_urlConnection.setRequestProperty("Set-Cookie",
"somekey=somevalue");
>or
> t_urlConnection.setRequestProperty("somekey", "somevalue");
> t_urlConnection.connect();
>By the way, I am running und
Doh!
I hit the send button too fast. I read Craig's material from last fall.
However, I was a bit confused by what I read and what I saw in the JMeter
code. In order to set an arbitary cookie:
URL t_url = new URL("http://localhost:8080/servlet/TestServlet");
URLConnection t_urlConnection = t_u
>Sean Snyders wrote:
>
>> Hi,
>> this is a bit oof the topic but has to do with the whole
>> internet/java/web-accessing thing.
>>
>> I'm trying to access a website through a "URLConnection" object.
>> This website accepts "form" information with the "POST" method, so I'm
using
>> "URLConnection.g
Sean Snyders wrote:
> Hi,
> this is a bit oof the topic but has to do with the whole
> internet/java/web-accessing thing.
>
> I'm trying to access a website through a "URLConnection" object.
> This website accepts "form" information with the "POST" method, so I'm using
> "URLConnection.getOutputS
Did you populate the list starting at point 1 but retrieve stating at point
0.
-Original Message-
From: Jeremiah Connelly [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 29, 1999 1:27 PM
To: [EMAIL PROTECTED]
Subject: Cookie help
Arrgh. I cannot figure out why this isn't working cor
The getDomain method of the Cookie class is supposed to return the domain
that this cookie is registered for. Unfortunately the Cookie specification
doesn't supply this data when it returns a cookie, only when one is being
set. So, this call is really only useful when you're getting ready to set
i'm new to servlet, and with my little knowledge...i suggest you to use
setDomain() method while you create a cookie.
On Mon, 29 Nov 1999, Jeremiah Connelly wrote:
> Arrgh. I cannot figure out why this isn't working correctly!! Every
> time I look up the domain "arnie.eng.mcd.mot.com" it ret
D]
Sent: Thursday, October 21, 1999 1:49
AM
Subject: Re: Cookie Update
What do you expect should happen? This code tells the browser to
keep the cookie for the specified amount of time, but your web server will
probably be throwing away the session after 30 minutes of inactivity
What do you expect should happen? This code tells the browser to keep
the cookie for the specified amount of time, but your web server will probably
be throwing away the session after 30 minutes of inactivity anyway so having the
cookie on hand won't buy you anything.
(*Chris*)
-
I get the date header so it is something else.
Thanks anyway
Dragomir
--
From: James Duncan Davidson[SMTP:[EMAIL PROTECTED]]
Sent: Friday, September 24, 1999 05:36 PM
To: [EMAIL PROTECTED]
Subject:Cookie Expirations (was: NO SUBJECT)
On Fri, 24 Sep 1999, Dr. Dragomir D.
On Fri, 24 Sep 1999, James Duncan Davidson wrote:
> On Fri, 24 Sep 1999, Dr. Dragomir D. Dimitrijevic wrote:
> > It looks like that addCookie method uses max age to encode
> > (calculate) the "Expires" tag, not "Max-Age" as one might expect.
> >
> > Is there any workaround?
>
> The problem may be
Thanks for the information & advice. I have been reading Cookie
specification from Netscape. Found lot of info there. But I am using IE
(not Netscape), and I could'nt see the file getting created in
c:\windows\cookies. I'll try Netscape also, and see if any cookie file gets
created in the profile
Mukul Gandhi wrote:
I cannot ensure you I am completly right, but here's what I think.
> Hi,
> 1. I have a doubt regarding Cookie.setMaxAge(int expiry) function. In a
> servlet, I invoke function setMaxAge(120) on a Cookie. This will set the
> expiry date of the cookie as 120 seconds. Is the exp
Dear Srini
In Javasoft Tutorial there are cookies explained in section on Servlets. There
is also a good introduction in servlet API docs at Cookie class. I am just
about cookies but I cannot repeat this, so please read and ask what do you not
understand. There is also very short and easy to read
CTED]>
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 mult
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 i
-
> From: James Tuan <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, June 08, 1999 7:58 PM
> Subject: Re: cookie with jsdk1.0 ?
>
> > Bruno Chevalier wrote:
> > >
> > > Thanks Rosdi for your help. The problem is that I can't acc
easily by changing the
'new' value to 1, which will make him/her a new visitor all the time.
- Original Message -
From: James Tuan <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 08, 1999 7:58 PM
Subject: Re: cookie with jsdk1.0 ?
> Bruno Cheva
Bruno Chevalier wrote:
>
> Thanks Rosdi for your help. The problem is that I can't access to this cookie in
I had the same exact problem with setting cookie with jdsk1.0. I wanted
to goto 2.0 but and servletRunner but it 2.0 required a OS upgrade that
would not be compatible with other 3rd party
Thanks Rosdi for your help. The problem is that I can't access to this cookie in
the servlet. I want people to execute the servlet only once. The servlet saves
data (language, browser,...) in the database in order to count the visitors. The
problem is that some browsers send several get HTTP-requ
Use javascript to implement cookie instead, it will work. The downside is,
you have to restrict your system (or whatever you call it) for browsers that
support javascript only.
Rosdi.
- Original Message -
From: Bruno Chevalier <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, Ju
53 matches
Mail list logo